Commit d5743eb3 authored by R. Andrew Ohana's avatar R. Andrew Ohana

fully fix build_dir copying

parent ff46004a
...@@ -671,10 +671,10 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo ...@@ -671,10 +671,10 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
if build_dir: if build_dir:
root = os.path.realpath(os.path.abspath(find_root_package_dir(m.sources[0]))) root = os.path.realpath(os.path.abspath(find_root_package_dir(m.sources[0])))
def copy_to_build_dir(filepath, root=root): def copy_to_build_dir(filepath, root=root):
filepath = os.path.abspath(filepath) filepath = os.path.realpath(os.path.abspath(filepath))
if os.path.realpath(filepath).startswith(root): if filepath.startswith(root):
mod_dir = os.path.join( mod_dir = os.path.join(build_dir,
build_dir, os.path.dirname(_relpath(filepath))) os.path.dirname(_relpath(filepath, root)))
if not os.path.isdir(mod_dir): if not os.path.isdir(mod_dir):
os.makedirs(mod_dir) os.makedirs(mod_dir)
shutil.copy(filepath, mod_dir) shutil.copy(filepath, mod_dir)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment