We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c1f74d commit 9056009Copy full SHA for 9056009
1 file changed
setup.py
@@ -139,6 +139,15 @@ def get_dir_if_exists(variable, default):
139
if not exists('libsbml'):
140
makedirs('libsbml')
141
142
+SETUP_REQUIRES = []
143
+# test whether cmake is in the PATH
144
+if shutil.which('cmake') is None:
145
+ SETUP_REQUIRES.append('cmake')
146
+
147
+# test whether swig is in the PATH
148
+if shutil.which('swig') is None:
149
+ SETUP_REQUIRES.append('swig')
150
151
152
class CMakeExtension(Extension):
153
"""Override the default setuptools extension building."""
@@ -355,6 +364,6 @@ def build_cmake(self, extension):
355
364
cmdclass={
356
365
'build_ext': CMakeBuild,
357
366
},
358
- setup_requires=['cmake', 'swig']
367
+ setup_requires=SETUP_REQUIRES
359
368
)
360
369
0 commit comments