Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
b0900657
Commit
b0900657
authored
Jul 03, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only regenerate Cython's own C sources when the .py files were updated
parent
b5f5a18d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
setup.py
setup.py
+12
-6
No files found.
setup.py
View file @
b0900657
...
...
@@ -60,6 +60,7 @@ except ValueError:
except
StandardError
:
print
(
"Compilation of '%s' failed"
%
ext
.
sources
[
0
])
from
Cython.Compiler.Main
import
compile
from
Cython
import
Utils
source_root
=
os
.
path
.
dirname
(
__file__
)
compiled_modules
=
[
"Cython.Plex.Scanners"
,
"Cython.Compiler.Scanning"
,
...
...
@@ -70,14 +71,19 @@ except ValueError:
for
module
in
compiled_modules
:
source_file
=
os
.
path
.
join
(
source_root
,
*
module
.
split
(
'.'
))
if
os
.
path
.
exists
(
source_file
+
".py"
):
source_file
=
source_file
+
".py"
pyx_
source_file
=
source_file
+
".py"
else
:
source_file
=
source_file
+
".pyx"
pyx_source_file
=
source_file
+
".pyx"
c_source_file
=
source_file
+
".c"
if
not
os
.
path
.
exists
(
c_source_file
)
or
\
Utils
.
file_newer_than
(
pyx_source_file
,
Utils
.
modification_time
(
c_source_file
)):
print
(
"Compiling module %s ..."
%
module
)
result
=
compile
(
source_file
)
if
result
.
c_file
:
result
=
compile
(
pyx_source_file
)
c_source_file
=
result
.
c_file
if
c_source_file
:
extensions
.
append
(
Extension
(
module
,
sources
=
[
result
.
c
_file
])
Extension
(
module
,
sources
=
[
c_source
_file
])
)
else
:
print
(
"Compilation failed"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment