Skip to content

Commit

Permalink
setup.py: Do not cythonize on sdist
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jun 30, 2024
1 parent 679b9be commit 1faf543
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ def readfile(filename):
'HAVE_ADD_COL_UNTYPED_ARGS': True}
print("Using compile_time_env: {}".format(compile_time_env), file=sys.stderr)

if any(x in sys.argv
for x in ['build', 'build_ext', 'bdist_wheel', 'install']):
ext_modules = cythonize(ext_modules, include_path=sys.path,
compile_time_env=compile_time_env),

setup(
name="sage_numerical_backends_coin",
version=readfile("VERSION").strip(),
Expand All @@ -87,8 +92,7 @@ def readfile(filename):
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
],
ext_modules = cythonize(ext_modules, include_path=sys.path,
compile_time_env=compile_time_env),
ext_modules=ext_modules,
cmdclass = {'test': SageTest, 'check_sage_testsuite': SageTestSage}, # adding a special setup command for tests
keywords=['milp', 'linear-programming', 'optimization'],
packages=['sage_numerical_backends_coin'],
Expand Down

0 comments on commit 1faf543

Please sign in to comment.