Lines 183-208
def build_module(name, pyxfilename, pyxbuild_dir=None, inplace=False, language_l
Link Here
|
183 |
build_in_temp = sargs.pop('build_in_temp',build_in_temp) |
183 |
build_in_temp = sargs.pop('build_in_temp',build_in_temp) |
184 |
|
184 |
|
185 |
from . import pyxbuild |
185 |
from . import pyxbuild |
186 |
olddir = os.getcwd() |
186 |
so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod, |
187 |
common = '' |
187 |
build_in_temp=build_in_temp, |
188 |
if pyxbuild_dir: |
188 |
pyxbuild_dir=pyxbuild_dir, |
189 |
# Windows concatenates the pyxbuild_dir to the pyxfilename when |
189 |
setup_args=sargs, |
190 |
# compiling, and then complains that the filename is too long |
190 |
inplace=inplace, |
191 |
common = os.path.commonprefix([pyxbuild_dir, pyxfilename]) |
191 |
reload_support=pyxargs.reload_support) |
192 |
if len(common) > 30: |
|
|
193 |
pyxfilename = os.path.relpath(pyxfilename) |
194 |
pyxbuild_dir = os.path.relpath(pyxbuild_dir) |
195 |
os.chdir(common) |
196 |
try: |
197 |
so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod, |
198 |
build_in_temp=build_in_temp, |
199 |
pyxbuild_dir=pyxbuild_dir, |
200 |
setup_args=sargs, |
201 |
inplace=inplace, |
202 |
reload_support=pyxargs.reload_support) |
203 |
finally: |
204 |
os.chdir(olddir) |
205 |
so_path = os.path.join(common, so_path) |
206 |
assert os.path.exists(so_path), "Cannot find: %s" % so_path |
192 |
assert os.path.exists(so_path), "Cannot find: %s" % so_path |
207 |
|
193 |
|
208 |
junkpath = os.path.join(os.path.dirname(so_path), name+"_*") #very dangerous with --inplace ? yes, indeed, trying to eat my files ;) |
194 |
junkpath = os.path.join(os.path.dirname(so_path), name+"_*") #very dangerous with --inplace ? yes, indeed, trying to eat my files ;) |
209 |
- |
|
|