Skip to content

Commit 1faf543

Browse files
author
Matthias Koeppe
committed
setup.py: Do not cythonize on sdist
1 parent 679b9be commit 1faf543

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ def readfile(filename):
6161
'HAVE_ADD_COL_UNTYPED_ARGS': True}
6262
print("Using compile_time_env: {}".format(compile_time_env), file=sys.stderr)
6363

64+
if any(x in sys.argv
65+
for x in ['build', 'build_ext', 'bdist_wheel', 'install']):
66+
ext_modules = cythonize(ext_modules, include_path=sys.path,
67+
compile_time_env=compile_time_env),
68+
6469
setup(
6570
name="sage_numerical_backends_coin",
6671
version=readfile("VERSION").strip(),
@@ -87,8 +92,7 @@ def readfile(filename):
8792
'Programming Language :: Python :: 3.11',
8893
'Programming Language :: Python :: 3.12',
8994
],
90-
ext_modules = cythonize(ext_modules, include_path=sys.path,
91-
compile_time_env=compile_time_env),
95+
ext_modules=ext_modules,
9296
cmdclass = {'test': SageTest, 'check_sage_testsuite': SageTestSage}, # adding a special setup command for tests
9397
keywords=['milp', 'linear-programming', 'optimization'],
9498
packages=['sage_numerical_backends_coin'],

0 commit comments

Comments
 (0)