Commit 3dfac3e2 authored by Stefan Behnel's avatar Stefan Behnel

more code cleanups

parent 3f44b92a
......@@ -673,13 +673,14 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
for m in module_list:
if build_dir:
root = os.path.realpath(os.path.abspath(m.name.split('.')[0]))
def copy_to_build_dir(file):
if os.path.realpath(os.path.abspath(file)).startswith(root):
dir = os.path.join(
build_dir, os.path.dirname(_relpath(file)))
if not os.path.isdir(dir):
os.makedirs(dir)
shutil.copy(file, dir)
def copy_to_build_dir(filepath, root=root):
filepath = os.path.abspath(filepath)
if os.path.realpath(filepath).startswith(root):
mod_dir = os.path.join(
build_dir, os.path.dirname(_relpath(filepath)))
if not os.path.isdir(mod_dir):
os.makedirs(mod_dir)
shutil.copy(filepath, mod_dir)
for dep in m.depends:
copy_to_build_dir(dep)
......
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