From f0368b6aa27e0d217f7218253e1ff28303520614 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Tue, 20 Dec 2016 13:30:55 +0100 Subject: [PATCH] Fixed problem with unknown storm_dir in setup.py --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 7ce0997..3362884 100755 --- a/setup.py +++ b/setup.py @@ -34,9 +34,10 @@ class CMakeBuild(build_ext): def initialize_options(self): build_ext.initialize_options(self) + self.storm_dir = None def finalize_options(self): - if hasattr(self, 'storm_dir'): + if self.storm_dir is not None: print('The custom storm directory', self.storm_dir) build_ext.finalize_options(self) @@ -50,7 +51,7 @@ class CMakeBuild(build_ext): cmake_args += ['-DCMAKE_BUILD_TYPE=' + cfg] build_args += ['--', '-j{}'.format(os.cpu_count() if os.cpu_count() is not None else 2)] - if hasattr(self, 'storm_dir'): + if self.storm_dir is not None: cmake_args += ['-Dstorm_DIR=' + self.storm_dir] env = os.environ.copy()