Files
ortools-clone/tools/setup.py

91 lines
3.2 KiB
Python
Raw Normal View History

from sys import executable
2018-03-08 17:21:02 +01:00
from os.path import join as pjoin
from os.path import dirname
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"""
try:
2017-12-13 09:21:21 +01:00
from setuptools import setup, Distribution
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()
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
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',
'ortools.linear_solver',
2017-11-16 23:27:58 +01:00
'ortools.sat',
'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',
'six >= 1.10',
],
2018-03-08 17:21:02 +01:00
package_data={
'ortools.constraint_solver' : ['_pywrapcp.dll'],
2017-11-14 16:43:16 +01:00
'ortools.data' : ['_pywraprcpsp.dll'],
'ortools.linear_solver' : ['_pywraplp.dll'],
'ortools.graph' : ['_pywrapgraph.dll'],
'ortools.algorithms' : ['_pywrapknapsack_solver.dll'],
'ortools.sat' : ['_pywrapsat.dll', '*.md'],
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,
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',
'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'),
)