2016-08-04 21:07:14 +02:00
|
|
|
from sys import executable
|
2018-03-08 17:21:02 +01:00
|
|
|
from os.path import join as pjoin
|
|
|
|
|
from os.path import dirname
|
2016-08-04 21:07:14 +02:00
|
|
|
|
|
|
|
|
setuptools_import_error_message = """setuptools is not installed for """ + executable + """
|
|
|
|
|
Please follow this link for installing instructions :
|
|
|
|
|
https://pypi.python.org/pypi/setuptools
|
2016-08-22 16:55:21 +00:00
|
|
|
make sure you use \"""" + executable + """\" during the installation"""
|
2016-08-04 21:07:14 +02:00
|
|
|
|
|
|
|
|
try:
|
2017-12-13 09:21:21 +01:00
|
|
|
from setuptools import setup, Distribution
|
2016-08-04 21:07:14 +02:00
|
|
|
except ImportError:
|
|
|
|
|
raise ImportError(setuptools_import_error_message)
|
|
|
|
|
|
2013-12-27 12:22:30 +00:00
|
|
|
# Utility function to read the README file.
|
|
|
|
|
# Used for the long_description. It's nice, because now 1) we have a top level
|
|
|
|
|
# README file and 2) it's easier to type in the README file than to put a raw
|
|
|
|
|
# string in below ...
|
|
|
|
|
def read(fname):
|
2013-12-27 12:24:15 +00:00
|
|
|
return open(pjoin(dirname(__file__), fname)).read()
|
2012-09-02 15:20:21 +00:00
|
|
|
|
2017-12-13 09:21:21 +01:00
|
|
|
class BinaryDistribution(Distribution):
|
2018-03-08 17:21:02 +01:00
|
|
|
def is_pure(self):
|
|
|
|
|
return False
|
|
|
|
|
def has_ext_modules(self):
|
|
|
|
|
return True
|
2017-12-13 09:21:21 +01:00
|
|
|
|
2018-03-08 17:21:02 +01:00
|
|
|
from setuptools.command.install import install
|
|
|
|
|
class InstallPlatlib(install):
|
|
|
|
|
def finalize_options(self):
|
|
|
|
|
install.finalize_options(self)
|
|
|
|
|
self.install_lib = self.install_platlib
|
2014-01-03 19:16:29 +00:00
|
|
|
|
2012-09-02 15:20:21 +00:00
|
|
|
setup(
|
2016-09-20 18:59:15 +02:00
|
|
|
name='ORTOOLS_PYTHON_VERSION',
|
2016-06-21 11:41:13 +02:00
|
|
|
version='VVVV',
|
2014-01-04 09:46:26 +00:00
|
|
|
packages=[
|
|
|
|
|
'ortools',
|
|
|
|
|
'ortools.algorithms',
|
|
|
|
|
'ortools.constraint_solver',
|
2017-11-14 16:43:16 +01:00
|
|
|
'ortools.data',
|
2014-01-04 09:46:26 +00:00
|
|
|
'ortools.graph',
|
2017-11-03 23:36:21 +01:00
|
|
|
'ortools.linear_solver',
|
2017-11-16 23:27:58 +01:00
|
|
|
'ortools.sat',
|
2018-01-16 14:35:25 +01:00
|
|
|
'ortools.sat.python',
|
|
|
|
|
'ortools.util',
|
|
|
|
|
],
|
2018-03-08 17:21:02 +01:00
|
|
|
install_requires=[
|
2017-10-27 08:52:59 +02:00
|
|
|
'protobuf >= PROTOBUF_TAG',
|
2017-10-15 14:36:41 +02:00
|
|
|
'six >= 1.10',
|
|
|
|
|
],
|
2018-03-08 17:21:02 +01:00
|
|
|
package_data={
|
2014-02-14 13:38:07 +00:00
|
|
|
'ortools.constraint_solver' : ['_pywrapcp.dll'],
|
2017-11-14 16:43:16 +01:00
|
|
|
'ortools.data' : ['_pywraprcpsp.dll'],
|
2014-02-14 13:38:07 +00:00
|
|
|
'ortools.linear_solver' : ['_pywraplp.dll'],
|
|
|
|
|
'ortools.graph' : ['_pywrapgraph.dll'],
|
|
|
|
|
'ortools.algorithms' : ['_pywrapknapsack_solver.dll'],
|
2018-05-31 11:49:48 +02:00
|
|
|
'ortools.sat' : ['_pywrapsat.dll', '*.md'],
|
2018-05-23 13:36:08 +02:00
|
|
|
DELETEWIN 'ortools' : ['libortools.DLL' DDDD]
|
2014-02-14 14:41:23 +00:00
|
|
|
},
|
2018-03-07 13:35:15 +01:00
|
|
|
include_package_data=True,
|
2012-09-02 15:20:21 +00:00
|
|
|
license='Apache 2.0',
|
2018-03-08 17:21:02 +01:00
|
|
|
author='Google Inc',
|
|
|
|
|
author_email='lperron@google.com',
|
|
|
|
|
description='Google OR-Tools python libraries and modules',
|
|
|
|
|
keywords=('operations research, constraint programming, ' +
|
|
|
|
|
'linear programming,' + 'flow algorithms,' +
|
|
|
|
|
'python'),
|
|
|
|
|
url='https://developers.google.com/optimization/',
|
|
|
|
|
download_url='https://github.com/google/or-tools/releases',
|
|
|
|
|
classifiers=[
|
2013-12-27 11:04:44 +00:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
|
|
|
|
'Intended Audience :: Developers',
|
|
|
|
|
'License :: OSI Approved :: Apache Software License',
|
|
|
|
|
'Operating System :: MacOS :: MacOS X',
|
|
|
|
|
'Operating System :: Microsoft :: Windows',
|
|
|
|
|
'Operating System :: POSIX :: Linux',
|
2016-07-12 14:55:11 +02:00
|
|
|
'Programming Language :: Python :: 2',
|
2013-12-27 22:13:41 +00:00
|
|
|
'Programming Language :: Python :: 2.7',
|
2016-09-20 18:59:15 +02:00
|
|
|
'Programming Language :: Python :: 3',
|
|
|
|
|
'Programming Language :: Python :: 3.5',
|
2017-01-26 19:14:01 +01:00
|
|
|
'Programming Language :: Python :: 3.6',
|
2013-12-27 11:04:44 +00:00
|
|
|
'Topic :: Office/Business :: Scheduling',
|
|
|
|
|
'Topic :: Scientific/Engineering',
|
|
|
|
|
'Topic :: Scientific/Engineering :: Mathematics',
|
|
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules'],
|
2017-12-13 09:21:21 +01:00
|
|
|
distclass=BinaryDistribution,
|
2018-03-08 17:21:02 +01:00
|
|
|
cmdclass={'install': InstallPlatlib},
|
|
|
|
|
long_description=read('README.txt'),
|
2012-09-02 15:20:21 +00:00
|
|
|
)
|