92 lines
3.3 KiB
Python
92 lines
3.3 KiB
Python
from sys import executable
|
|
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
|
|
make sure you use \"""" + executable + """\" during the installation"""
|
|
|
|
try:
|
|
from setuptools import find_packages, setup
|
|
from setuptools.dist import Distribution
|
|
from setuptools.command.install import install
|
|
except ImportError:
|
|
raise ImportError(setuptools_import_error_message)
|
|
|
|
|
|
class BinaryDistribution(Distribution):
|
|
def is_pure(self):
|
|
return False
|
|
|
|
def has_ext_modules(self):
|
|
return True
|
|
|
|
|
|
class InstallPlatlib(install):
|
|
def finalize_options(self):
|
|
install.finalize_options(self)
|
|
self.install_lib = self.install_platlib
|
|
|
|
|
|
# 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):
|
|
return open(pjoin(dirname(__file__), fname)).read()
|
|
|
|
|
|
setup(
|
|
name='ORTOOLS_PYTHON_VERSION',
|
|
version='VVVV',
|
|
packages=find_packages(),
|
|
install_requires=[
|
|
'protobuf >= 3.18.0',
|
|
'absl-py >= 0.13',
|
|
],
|
|
package_data={
|
|
'ortools.init' : ['_pywrapinit.dll', '*.pyi'],
|
|
'ortools.algorithms' : ['_pywrapknapsack_solver.dll'],
|
|
'ortools.graph' : ['_pywrapgraph.dll'],
|
|
'ortools.constraint_solver' : ['_pywrapcp.dll', '*.pyi'],
|
|
'ortools.linear_solver' : ['_pywraplp.dll', '*.pyi'],
|
|
'ortools.packing':['*.pyi'],
|
|
'ortools.sat' : ['_pywrapsat.dll', '*.pyi', '*.md'],
|
|
'ortools.scheduling' : ['_pywraprcpsp.dll', '*.pyi'],
|
|
'ortools.util' : ['_sorted_interval_list.dll', '*.pyi'],
|
|
DELETEWIN 'ortools' : ['.libs/*']
|
|
},
|
|
include_package_data=True,
|
|
license='Apache 2.0',
|
|
author='Google LLC',
|
|
author_email='or-tools@google.com',
|
|
description='Google OR-Tools python libraries and modules',
|
|
long_description=read('README.txt'),
|
|
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=[
|
|
'Development Status :: 5 - Production/Stable',
|
|
'Intended Audience :: Developers',
|
|
'License :: OSI Approved :: Apache Software License',
|
|
'Operating System :: POSIX :: Linux',
|
|
'Operating System :: MacOS :: MacOS X',
|
|
'Operating System :: Microsoft :: Windows',
|
|
'Programming Language :: C++',
|
|
'Programming Language :: Python',
|
|
'Programming Language :: Python :: 3',
|
|
'Programming Language :: Python :: 3.6',
|
|
'Programming Language :: Python :: 3.7',
|
|
'Programming Language :: Python :: 3.8',
|
|
'Programming Language :: Python :: 3.9',
|
|
'Topic :: Office/Business :: Scheduling',
|
|
'Topic :: Scientific/Engineering',
|
|
'Topic :: Scientific/Engineering :: Mathematics',
|
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
],
|
|
distclass=BinaryDistribution,
|
|
cmdclass={'install': InstallPlatlib},
|
|
)
|