- Timestamp:
- Nov 13, 2018 12:52:30 PM (5 years ago)
- Branches:
- ticket-1094-headless
- Children:
- ffbf35ee
- Parents:
- 1dc134e6 (diff), f560e23 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
run.py
r3388337 r1580cc3 95 95 try: 96 96 import periodictable 97 except :97 except ImportError: 98 98 addpath(joinpath(root, '..', 'periodictable')) 99 99 100 100 try: 101 101 import bumps 102 except :102 except ImportError: 103 103 addpath(joinpath(root, '..', 'bumps')) 104 104 105 105 try: 106 106 import tinycc 107 except :107 except ImportError: 108 108 addpath(joinpath(root, '../tinycc/build/lib')) 109 109 … … 111 111 #addpath(os.path.join(root, '..','wxPython-src-3.0.0.0','wxPython')) 112 112 113 <<<<<<< HEAD 113 114 # Build project if the build directory does not already exist. 114 115 # PAK: with "update" we can always build since it is fast 115 116 if rebuild or not os.path.exists(build_path): 117 ======= 118 # Put the sas source tree on the path 119 addpath(joinpath(root, 'src')) 120 121 # Put sasmodels on the path 122 addpath(joinpath(root, '../sasmodels/')) 123 124 # Check if the C extensions are already built 125 try: 126 from sas.sascalc.pr import _pr_inversion 127 from sas.sascalc.calculator import _sld2i 128 from sas.sascalc.file_converter import _bsl_loader 129 except ImportError: 130 rebuild = True 131 132 # Build C extensions if necessary. Do an inplace build to simplify path. 133 if rebuild: 134 >>>>>>> master 116 135 import subprocess 117 build_cmd = [sys.executable, "setup.py", "build ", "update"]136 build_cmd = [sys.executable, "setup.py", "build_ext", "--inplace", "update"] 118 137 if os.name == 'nt': 119 138 build_cmd.append('--compiler=tinycc') … … 122 141 with cd(root): 123 142 subprocess.call(build_cmd, shell=shell) 124 125 # Put the source trees on the path126 addpath(joinpath(root, 'src'))127 128 # sasmodels on the path129 addpath(joinpath(root, '../sasmodels/'))130 131 # The sas.models package Compiled Model files should be pulled in from the build directory even though132 # the source is stored in src/sas/models.133 134 # Compiled modules need to be pulled from the build directory.135 # Some packages are not where they are needed, so load them explicitly.136 import sas.sascalc.pr137 sas.sascalc.pr.core = import_package('sas.sascalc.pr.core',138 joinpath(build_path, 'sas', 'sascalc', 'pr', 'core'))139 140 # Compiled modules need to be pulled from the build directory.141 # Some packages are not where they are needed, so load them explicitly.142 import sas.sascalc.file_converter143 sas.sascalc.file_converter.core = import_package('sas.sascalc.file_converter.core',144 joinpath(build_path, 'sas', 'sascalc', 'file_converter', 'core'))145 146 import sas.sascalc.calculator147 sas.sascalc.calculator.core = import_package('sas.sascalc.calculator.core',148 joinpath(build_path, 'sas', 'sascalc', 'calculator', 'core'))149 150 sys.path.append(build_path)151 143 152 144 set_git_tag()
Note: See TracChangeset
for help on using the changeset viewer.