Changeset 5980b1a in sasview
- Timestamp:
- Oct 9, 2013 1:43:43 PM (11 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:
- 17b1873
- Parents:
- cc3066a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
setup.py
r79d5b6c r5980b1a 5 5 import sys 6 6 import os 7 import platform 8 import shutil 9 from setuptools import setup, Extension, find_packages 7 from setuptools import setup, Extension 10 8 from distutils.command.build_ext import build_ext 11 9 … … 56 54 f_path = os.path.join(sans_dir, 'plugin_models') 57 55 if os.path.isdir(f_path): 58 for f ilein os.listdir(f_path):59 if f ilein plugin_model_list:60 file_path = os.path.join(f_path, f ile)56 for f in os.listdir(f_path): 57 if f in plugin_model_list: 58 file_path = os.path.join(f_path, f) 61 59 os.remove(file_path) 62 60 … … 93 91 if enable_openmp: 94 92 if copt.has_key(c): 95 for e in self.extensions:96 e.extra_compile_args = copt[ c ]93 for e in self.extensions: 94 e.extra_compile_args = copt[ c ] 97 95 if lopt.has_key(c): 98 96 for e in self.extensions: … … 106 104 build_ext.build_extensions(self) 107 105 106 # sans module 107 package_dir["sans"] = os.path.join("src", "sans") 108 packages.append("sans") 108 109 109 110 # sans.invariant … … 118 119 packages.extend(["sans.guiframe", "sans.guiframe.local_perspectives"]) 119 120 # build local plugin 120 for d irin os.listdir(os.path.join(guiframe_path, "local_perspectives")):121 if d irnot in ['.svn','__init__.py', '__init__.pyc']:122 package_name = "sans.guiframe.local_perspectives." + d ir121 for d in os.listdir(os.path.join(guiframe_path, "local_perspectives")): 122 if d not in ['.svn','__init__.py', '__init__.pyc']: 123 package_name = "sans.guiframe.local_perspectives." + d 123 124 packages.append(package_name) 124 package_dir[package_name] = os.path.join(guiframe_path, "local_perspectives", d ir)125 package_dir[package_name] = os.path.join(guiframe_path, "local_perspectives", d) 125 126 126 127 # sans.dataloader … … 216 217 if not os.name=='nt': 217 218 IGNORED_FILES.extend(["gamma_win.c","winFuncs.c"]) 218 219 219 220 220 EXTENSIONS = [".c", ".cpp"] … … 247 247 append_file(file_list=smear_sources, dir_path=smear_dir) 248 248 249 package_dir["sans.models"] = model_dir 250 package_dir["sans.models.sans_extension"] = os.path.join("src", "sans", "models", "sans_extension") 251 package_data['sans.models'] = [os.path.join('media', "*.*")] 252 package_data['sans.models'] += [os.path.join('media','img', "*.*")] 253 packages.extend(["sans.models","sans.models.sans_extension"]) 254 255 smearer_sources = [os.path.join(smear_dir, "smearer.cpp"), 256 os.path.join(smear_dir, "smearer_module.cpp")] 257 geni_sources = [os.path.join(gen_dir, "sld2i_module.cpp")] 258 if os.name=='nt': 259 smearer_sources.append(os.path.join(igordir, "winFuncs.c")) 260 geni_sources.append(os.path.join(igordir, "winFuncs.c")) 261 ext_modules.extend( [ Extension("sans.models.sans_extension.c_models", 262 sources=model_sources, 263 include_dirs=[igordir, includedir, 264 c_model_dir, numpy_incl_path, cephes_dir], 265 ), 266 # Smearer extension 267 Extension("sans.models.sans_extension.smearer", 268 sources = smearer_sources, 269 include_dirs=[igordir, 270 smear_dir, numpy_incl_path], 271 ), 272 273 Extension("sans.models.sans_extension.smearer2d_helper", 274 sources = [os.path.join(smear_dir, 275 "smearer2d_helper_module.cpp"), 276 os.path.join(smear_dir, 277 "smearer2d_helper.cpp"),], 278 include_dirs=[smear_dir, numpy_incl_path], 279 ), 280 281 Extension("sans.models.sans_extension.sld2i", 282 sources = [os.path.join(gen_dir, 283 "sld2i_module.cpp"), 284 os.path.join(gen_dir, 285 "sld2i.cpp"), 286 os.path.join(c_model_dir, 287 "libfunc.c"), 288 os.path.join(c_model_dir, 289 "librefl.c"),], 290 include_dirs=[gen_dir, includedir, 291 c_model_dir, numpy_incl_path], 292 ) 293 ] ) 294 249 295 # SasView 250 296 … … 264 310 required.extend(['pil']) 265 311 266 312 # Set up SasView 267 313 setup( 268 314 name="sasview", … … 271 317 author = "University of Tennessee", 272 318 author_email = "sansdanse@gmail.com", 273 url = "http:// danse.chem.utk.edu",319 url = "http://sasview.org", 274 320 license = "PSF", 275 321 keywords = "small-angle x-ray and neutron scattering analysis",
Note: See TracChangeset
for help on using the changeset viewer.