- Timestamp:
- Dec 9, 2011 2:27:02 PM (12 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 2cef9d3
- Parents:
- 849fa92
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
setup.py
r01de557 r13f00a0 24 24 ext_modules = [] 25 25 26 # TODO check for sans/__init__.py 27 28 # Enable OpenMP 29 extra_compile_args = [] 30 extra_link_args = [] 31 if sys.platform=='linux2' or (sys.platform=='darwin' and platform.architecture()[0]=='64bit'): 32 extra_compile_args = ['-fopenmp'] 33 extra_link_args = ['-lgomp'] 34 elif os.name=='nt': 35 extra_compile_args = ['/openmp'] 26 # Options to enable OpenMP 27 copt = {'msvc': ['/openmp'], 28 'mingw32' : ['-fopenmp'], 29 'unix' : ['-fopenmp']} 30 lopt = {'msvc': ['/MANIFEST'], 31 'mingw32' : ['-fopenmp'], 32 'unix' : ['-lgomp']} 33 34 class build_ext_subclass( build_ext ): 35 def build_extensions(self): 36 # Get 64-bitness 37 is_64bits = sys.maxsize > 2**32 38 39 c = self.compiler.compiler_type 40 print "Compiling with %s (64bit=%s)" % (c, str(is_64bits)) 41 42 if not (sys.platform=='darwin' and not is_64bits): 43 if copt.has_key(c): 44 for e in self.extensions: 45 e.extra_compile_args = copt[ c ] 46 if lopt.has_key(c): 47 for e in self.extensions: 48 e.extra_link_args = lopt[ c ] 49 50 build_ext.build_extensions(self) 51 36 52 37 53 # sans.invariant … … 75 91 ], 76 92 include_dirs=[numpy_incl_path], 77 extra_compile_args=extra_compile_args,78 extra_link_args=extra_link_args79 93 ) ) 80 94 … … 126 140 os.path.join("park-1.2.1", "park", "lib", "resolution.c"), 127 141 ], 128 extra_compile_args=extra_compile_args,129 extra_link_args=extra_link_args130 142 ) ) 131 143 … … 198 210 sources=model_sources, 199 211 include_dirs=[igordir, srcdir, c_model_dir, numpy_incl_path], 200 extra_compile_args=extra_compile_args,201 extra_link_args=extra_link_args202 212 ), 203 213 # Smearer extension … … 205 215 sources = smearer_sources, 206 216 include_dirs=[igordir, smear_dir, numpy_incl_path], 207 extra_compile_args=extra_compile_args,208 extra_link_args=extra_link_args209 217 ), 210 218 … … 214 222 os.path.join(smear_dir, "smearer2d_helper.cpp"),], 215 223 include_dirs=[smear_dir,numpy_incl_path], 216 extra_compile_args=extra_compile_args,217 extra_link_args=extra_link_args218 224 ) 219 225 ] ) … … 255 261 "sansview = sans.sansview.sansview:run", 256 262 ] 257 } 263 }, 264 cmdclass = {'build_ext': build_ext_subclass } 258 265 )
Note: See TracChangeset
for help on using the changeset viewer.