Skip to content

Commit 0963558

Browse files
committed
add small check for swig
1 parent a2de139 commit 0963558

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

setup.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
The setup script for OpenMOC
33
'''
44

5-
import os, site, string, sys
5+
import os, shutil, site, string, sys
66
from distutils.errors import DistutilsOptionError
77
import distutils.ccompiler
88
import multiprocessing
@@ -114,6 +114,12 @@ def initialize_options(self):
114114
self.coverage_mode = False
115115
self.with_ccache = False
116116

117+
# Check that swig is installed:
118+
swigLocation = shutil.which('swig')
119+
if not swigLocation:
120+
print("-> Please install swig before building <-")
121+
sys.exit()
122+
117123

118124
def finalize_options(self):
119125
"""Extract options from the flags invoked by the user at compile time.

0 commit comments

Comments
 (0)