-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathsetup.py.in
More file actions
112 lines (101 loc) · 4.52 KB
/
setup.py.in
File metadata and controls
112 lines (101 loc) · 4.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
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='@PROJECT_NAME@',
version='@PROJECT_VERSION@',
packages=find_packages(),
python_requires='>= 3.6',
install_requires=[
'absl-py >= 0.13',
'numpy >= 1.13.3',
'protobuf >= 3.19.4',
],
package_data={
'@PROJECT_NAME@':[$<$<STREQUAL:$<TARGET_PROPERTY:@PYTHON_PROJECT@,TYPE>,SHARED_LIBRARY>:'.libs/*', '../$<TARGET_SONAME_FILE_NAME:@PYTHON_PROJECT@>'>],
'@PROJECT_NAME@.init':['$<TARGET_FILE_NAME:pywrapinit>'],
'@PROJECT_NAME@.algorithms':['$<TARGET_FILE_NAME:pywrapknapsack_solver>'],
'@PROJECT_NAME@.bop':['*.pyi'],
'@PROJECT_NAME@.glop':['*.pyi'],
'@PROJECT_NAME@.graph.python':[
'$<TARGET_FILE_NAME:linear_sum_assignment_pybind11>',
'$<TARGET_FILE_NAME:max_flow_pybind11>',
'$<TARGET_FILE_NAME:min_cost_flow_pybind11>'
],
'@PROJECT_NAME@.constraint_solver':['$<TARGET_FILE_NAME:pywrapcp>', '*.pyi'],
'@PROJECT_NAME@.linear_solver':['$<TARGET_FILE_NAME:pywraplp>', '*.pyi'],
'@PROJECT_NAME@.model_builder.python':['$<TARGET_FILE_NAME:pywrap_model_builder_helper>', '*.pyi'],
'@PROJECT_NAME@.packing':['*.pyi'],
'@PROJECT_NAME@.pdlp':['*.pyi'],
'@PROJECT_NAME@.sat.python':['$<TARGET_FILE_NAME:swig_helper>', '*.pyi'],
'@PROJECT_NAME@.scheduling':['$<TARGET_FILE_NAME:pywraprcpsp>', '*.pyi'],
'@PROJECT_NAME@.util.python':['$<TARGET_FILE_NAME:sorted_interval_list>', '*.pyi'],
},
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',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Information Technology',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Operating System :: Unix',
'Operating System :: POSIX :: Linux',
'Operating System :: POSIX :: BSD :: FreeBSD',
'Operating System :: MacOS',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: C++',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Office/Business :: Scheduling',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Python Modules',
],
distclass=BinaryDistribution,
cmdclass={'install': InstallPlatlib},
)