Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/build/pkgs/cython/patches/build_dir.patch
8820 views
1
From d5743eb30e21233d8adeedab5a73dc9444e367ff Mon Sep 17 00:00:00 2001
2
From: "R. Andrew Ohana" <[email protected]>
3
Date: Sat, 11 May 2013 23:15:39 -0700
4
Subject: [PATCH] fully fix build_dir copying
5
6
---
7
Cython/Build/Dependencies.py | 8 ++++----
8
1 file changed, 4 insertions(+), 4 deletions(-)
9
10
diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
11
index a2676e1..5e73782 100644
12
--- a/Cython/Build/Dependencies.py
13
+++ b/Cython/Build/Dependencies.py
14
@@ -671,10 +671,10 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
15
if build_dir:
16
root = os.path.realpath(os.path.abspath(find_root_package_dir(m.sources[0])))
17
def copy_to_build_dir(filepath, root=root):
18
- filepath = os.path.abspath(filepath)
19
- if os.path.realpath(filepath).startswith(root):
20
- mod_dir = os.path.join(
21
- build_dir, os.path.dirname(_relpath(filepath)))
22
+ filepath = os.path.realpath(os.path.abspath(filepath))
23
+ if filepath.startswith(root):
24
+ mod_dir = os.path.join(build_dir,
25
+ os.path.dirname(_relpath(filepath, root)))
26
if not os.path.isdir(mod_dir):
27
os.makedirs(mod_dir)
28
shutil.copy(filepath, mod_dir)
29
--
30
1.8.2.1
31
32
33