Skip to content

Commit 2b4bd1d

Browse files
author
Dilawar Singh
committed
Fixes the build failure on CentOS6.
1 parent 76c3930 commit 2b4bd1d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
class CMakeExtension(Extension):
5858
def __init__(self, name):
5959
# don't invoke the original build_ext for this special extension
60-
Extension.__init__(self, name, sources=[])
60+
Extension.__init__(self, name, sources=[], optional=True)
6161

6262
class TestCommand(Command):
6363
user_options = []
@@ -77,6 +77,7 @@ def run(self):
7777
class build_ext(_build_ext):
7878
user_options = [('with-boost', None, 'Use Boost Libraries (OFF)')
7979
, ('with-gsl', None, 'Use Gnu Scienfific Library (ON)')
80+
, ('with-gsl-static', None, 'Use GNU Scientific Library (static library) (OFF)')
8081
, ('debug', None, 'Build moose in debugging mode (OFF)')
8182
, ('no-build', None, 'DO NOT BUILD. (for debugging/development)')
8283
] + _build_ext.user_options
@@ -85,6 +86,7 @@ def initialize_options(self):
8586
# Initialize options.
8687
self.with_boost = 0
8788
self.with_gsl = 1
89+
self.with_gsl_static = 0
8890
self.debug = 0
8991
self.no_build = 0
9092
self.cmake_options = {}
@@ -99,6 +101,9 @@ def finalize_options(self):
99101
if self.with_boost:
100102
self.cmake_options['WITH_BOOST'] = 'ON'
101103
self.cmake_options['WITH_GSL'] = 'OFF'
104+
else:
105+
if self.with_gsl_static:
106+
self.cmake_options['GSL_USE_STATIC_LIBRARIES'] = 'ON'
102107
if self.debug:
103108
self.cmake_options['CMAKE_BUILD_TYPE'] = 'Debug'
104109
else:
@@ -157,6 +162,6 @@ def build_cmake(self, ext):
157162
, os.path.join('chemUtil', 'rainbow2.pkl')
158163
]
159164
},
160-
ext_modules=[CMakeExtension('pymoose')],
165+
ext_modules=[CMakeExtension('')],
161166
cmdclass={'build_ext': build_ext, 'test': TestCommand},
162167
)

0 commit comments

Comments
 (0)