Files
ortools-clone/ortools/python/setup.py.in

114 lines
4.6 KiB
Python
Raw Normal View History

2020-11-30 21:11:25 +01:00
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):
2020-11-30 21:11:25 +01:00
def is_pure(self):
return False
def has_ext_modules(self):
return True
class InstallPlatlib(install):
def finalize_options(self):
install.finalize_options(self)
2020-11-18 11:33:02 +01:00
self.install_lib = self.install_platlib
2020-11-30 21:11:25 +01: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):
return open(pjoin(dirname(__file__), fname)).read()
setup(
2022-09-30 14:47:49 +02:00
name='@PYTHON_PROJECT@',
2020-11-30 21:11:25 +01:00
version='@PROJECT_VERSION@',
packages=find_packages(),
2021-11-17 12:28:27 +01:00
python_requires='>= 3.6',
2020-11-30 21:11:25 +01:00
install_requires=[
2021-09-21 13:52:03 +02:00
'absl-py >= 0.13',
2021-11-17 12:28:27 +01:00
'numpy >= 1.13.3',
'protobuf >= 4.21.5',
2020-11-30 21:11:25 +01:00
],
package_data={
2022-09-30 14:47:49 +02:00
'@PYTHON_PROJECT@':[$<$<STREQUAL:$<TARGET_PROPERTY:@PROJECT_NAME@,TYPE>,SHARED_LIBRARY>:'.libs/*','../$<TARGET_SONAME_FILE_NAME:@PROJECT_NAME@>'>],
'@PYTHON_PROJECT@.init':['$<TARGET_FILE_NAME:pywrapinit>'],
'@PYTHON_PROJECT@.algorithms':['$<TARGET_FILE_NAME:pywrapknapsack_solver>'],
'@PYTHON_PROJECT@.bop':['*.pyi'],
'@PYTHON_PROJECT@.glop':['*.pyi'],
'@PYTHON_PROJECT@.graph.python':[
2022-03-31 18:21:20 +02:00
'$<TARGET_FILE_NAME:linear_sum_assignment_pybind11>',
'$<TARGET_FILE_NAME:max_flow_pybind11>',
'$<TARGET_FILE_NAME:min_cost_flow_pybind11>'
],
2022-09-30 14:47:49 +02:00
'@PYTHON_PROJECT@.constraint_solver':['$<TARGET_FILE_NAME:pywrapcp>', '*.pyi'],
'@PYTHON_PROJECT@.linear_solver':['$<TARGET_FILE_NAME:pywraplp>', '*.pyi'],
'@PYTHON_PROJECT@.linear_solver.python':['$<TARGET_FILE_NAME:pywrap_model_builder_helper>', '*.pyi'],
'@PYTHON_PROJECT@.packing':['*.pyi'],
'@PYTHON_PROJECT@.pdlp':['*.pyi'],
'@PYTHON_PROJECT@.sat':['*.pyi'],
'@PYTHON_PROJECT@.sat.python':['$<TARGET_FILE_NAME:swig_helper>', '*.pyi'],
'@PYTHON_PROJECT@.scheduling':['$<TARGET_FILE_NAME:pywraprcpsp>', '*.pyi'],
'@PYTHON_PROJECT@.util.python':['$<TARGET_FILE_NAME:sorted_interval_list>', '*.pyi'],
2020-11-30 21:11:25 +01:00
},
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',
2021-11-05 14:08:25 +01:00
'Environment :: Console',
2020-11-30 21:11:25 +01:00
'Intended Audience :: Developers',
2021-11-05 14:08:25 +01:00
'Intended Audience :: Education',
'Intended Audience :: Information Technology',
'Intended Audience :: Science/Research',
2020-11-30 21:11:25 +01:00
'License :: OSI Approved :: Apache Software License',
2021-11-05 14:08:25 +01:00
'Operating System :: Unix',
2020-11-30 21:11:25 +01:00
'Operating System :: POSIX :: Linux',
2021-11-05 14:08:25 +01:00
'Operating System :: POSIX :: BSD :: FreeBSD',
'Operating System :: MacOS',
2020-11-30 21:11:25 +01:00
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
2021-11-05 14:08:25 +01:00
'Programming Language :: Python :: 3 :: Only',
2020-11-30 21:11:25 +01:00
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
2021-11-05 14:08:25 +01:00
'Programming Language :: Python :: 3.10',
'Programming Language :: C++',
'Programming Language :: Python :: Implementation :: CPython',
2020-11-30 21:11:25 +01:00
'Topic :: Office/Business :: Scheduling',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
2021-11-05 14:08:25 +01:00
'Topic :: Software Development',
2020-11-30 21:11:25 +01:00
'Topic :: Software Development :: Libraries :: Python Modules',
],
distclass=BinaryDistribution,
cmdclass={'install': InstallPlatlib},
)