Skip to content

Commit 6303b87

Browse files
authored
Merge pull request #488 from LovisAnderson/fix_setup
fix: use_cython bool different from imported function
2 parents 23f3479 + 76ae67c commit 6303b87

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

setup.py

+25-26
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
extra_compile_args.append('-UNDEBUG')
4242
sys.argv.remove("--debug")
4343

44-
cythonize = True
44+
use_cython = True
4545

4646
packagedir = os.path.join('src', 'pyscipopt')
4747

@@ -55,12 +55,12 @@
5555
if not os.path.exists(os.path.join(packagedir, 'scip.c')):
5656
print('Cython is required')
5757
quit(1)
58-
cythonize = False
58+
use_cython = False
5959

6060
if not os.path.exists(os.path.join(packagedir, 'scip.pyx')):
61-
cythonize = False
61+
use_cython = False
6262

63-
ext = '.pyx' if cythonize else '.c'
63+
ext = '.pyx' if use_cython else '.c'
6464

6565
extensions = [Extension('pyscipopt.scip', [os.path.join(packagedir, 'scip'+ext)],
6666
include_dirs=[includedir],
@@ -70,33 +70,32 @@
7070
extra_link_args=extra_link_args
7171
)]
7272

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})
7675

7776
with open('README.md') as f:
7877
long_description = f.read()
7978

8079
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,
8584
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+
author_email='[email protected]',
88+
license='MIT',
9089
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']}
102101
)

0 commit comments

Comments
 (0)