Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 912814 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 912814