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
b43f6828
Commit
b43f6828
authored
Dec 22, 2010
by
Alexey Borzenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix .pyxdep files in pyximport and tests
parent
e3c9a786
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
pyximport/pyximport.py
pyximport/pyximport.py
+5
-2
pyximport/test/test_pyximport.py
pyximport/test/test_pyximport.py
+2
-1
No files found.
pyximport/pyximport.py
View file @
b43f6828
...
...
@@ -112,6 +112,7 @@ def handle_special_build(modname, pyxfilename):
return
ext
,
setup_args
def
handle_dependencies
(
pyxfilename
):
testing
=
'_test_files'
in
globals
()
dependfile
=
os
.
path
.
splitext
(
pyxfilename
)[
0
]
+
PYXDEP_EXT
# by default let distutils decide whether to rebuild on its own
...
...
@@ -132,6 +133,7 @@ def handle_dependencies(pyxfilename):
files
.
extend
(
glob
.
glob
(
fullpath
))
# only for unit testing to see we did the right thing
if
testing
:
_test_files
[:]
=
[]
#$pycheck_no
# if any file that the pyxfile depends upon is newer than
...
...
@@ -143,6 +145,7 @@ def handle_dependencies(pyxfilename):
print
(
"Rebuilding because of "
,
file
)
filetime
=
os
.
path
.
getmtime
(
file
)
os
.
utime
(
pyxfilename
,
(
filetime
,
filetime
))
if
testing
:
_test_files
.
append
(
file
)
def
build_module
(
name
,
pyxfilename
,
pyxbuild_dir
=
None
):
...
...
pyximport/test/test_pyximport.py
View file @
b43f6828
import
pyximport
;
pyximport
.
install
()
import
pyximport
;
pyximport
.
install
(
reload_support
=
True
)
import
os
,
sys
import
time
,
shutil
import
tempfile
...
...
@@ -21,6 +21,7 @@ def on_remove_file_error(func, path, excinfo):
print
"You may want to delete this yourself when you get a chance."
def
test
():
pyximport
.
_test_files
=
[]
tempdir
=
make_tempdir
()
sys
.
path
.
append
(
tempdir
)
filename
=
os
.
path
.
join
(
tempdir
,
"dummy.pyx"
)
...
...
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