|
41 | 41 | extra_compile_args.append('-UNDEBUG')
|
42 | 42 | sys.argv.remove("--debug")
|
43 | 43 |
|
44 |
| -cythonize = True |
| 44 | +use_cython = True |
45 | 45 |
|
46 | 46 | packagedir = os.path.join('src', 'pyscipopt')
|
47 | 47 |
|
|
55 | 55 | if not os.path.exists(os.path.join(packagedir, 'scip.c')):
|
56 | 56 | print('Cython is required')
|
57 | 57 | quit(1)
|
58 |
| - cythonize = False |
| 58 | + use_cython = False |
59 | 59 |
|
60 | 60 | if not os.path.exists(os.path.join(packagedir, 'scip.pyx')):
|
61 |
| - cythonize = False |
| 61 | + use_cython = False |
62 | 62 |
|
63 |
| -ext = '.pyx' if cythonize else '.c' |
| 63 | +ext = '.pyx' if use_cython else '.c' |
64 | 64 |
|
65 | 65 | extensions = [Extension('pyscipopt.scip', [os.path.join(packagedir, 'scip'+ext)],
|
66 | 66 | include_dirs=[includedir],
|
|
70 | 70 | extra_link_args=extra_link_args
|
71 | 71 | )]
|
72 | 72 |
|
73 |
| -if cythonize: |
74 |
| - extensions = cythonize(extensions, compiler_directives = {'language_level': 3}) |
75 |
| -# extensions = cythonize(extensions, compiler_directives={'linetrace': True}) |
| 73 | +if use_cython: |
| 74 | + extensions = cythonize(extensions, compiler_directives={'language_level': 3}) |
76 | 75 |
|
77 | 76 | with open('README.md') as f:
|
78 | 77 | long_description = f.read()
|
79 | 78 |
|
80 | 79 | setup(
|
81 |
| - name = 'PySCIPOpt', |
82 |
| - version = version, |
83 |
| - description = 'Python interface and modeling environment for SCIP', |
84 |
| - long_description = long_description, |
| 80 | + name='PySCIPOpt', |
| 81 | + version=version, |
| 82 | + description='Python interface and modeling environment for SCIP', |
| 83 | + long_description=long_description, |
85 | 84 | long_description_content_type='text/markdown',
|
86 |
| - url = 'https://github.com/SCIP-Interfaces/PySCIPOpt', |
87 |
| - author = 'Zuse Institute Berlin', |
88 |
| - author_email = '[email protected]', |
89 |
| - license = 'MIT', |
| 85 | + url='https://github.com/SCIP-Interfaces/PySCIPOpt', |
| 86 | + author='Zuse Institute Berlin', |
| 87 | + |
| 88 | + license='MIT', |
90 | 89 | classifiers=[
|
91 |
| - 'Development Status :: 4 - Beta', |
92 |
| - 'Intended Audience :: Science/Research', |
93 |
| - 'Intended Audience :: Education', |
94 |
| - 'License :: OSI Approved :: MIT License', |
95 |
| - 'Programming Language :: Python :: 3', |
96 |
| - 'Programming Language :: Cython', |
97 |
| - 'Topic :: Scientific/Engineering :: Mathematics'], |
98 |
| - ext_modules = extensions, |
99 |
| - packages = ['pyscipopt'], |
100 |
| - package_dir = {'pyscipopt': packagedir}, |
101 |
| - package_data = {'pyscipopt': ['scip.pyx', 'scip.pxd', '*.pxi']} |
| 90 | + 'Development Status :: 4 - Beta', |
| 91 | + 'Intended Audience :: Science/Research', |
| 92 | + 'Intended Audience :: Education', |
| 93 | + 'License :: OSI Approved :: MIT License', |
| 94 | + 'Programming Language :: Python :: 3', |
| 95 | + 'Programming Language :: Cython', |
| 96 | + 'Topic :: Scientific/Engineering :: Mathematics'], |
| 97 | + ext_modules=extensions, |
| 98 | + packages=['pyscipopt'], |
| 99 | + package_dir={'pyscipopt': packagedir}, |
| 100 | + package_data={'pyscipopt': ['scip.pyx', 'scip.pxd', '*.pxi']} |
102 | 101 | )
|
0 commit comments