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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
35f7f3d7
Commit
35f7f3d7
authored
Sep 11, 2009
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python 3 fixes
parent
31b438e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
Cython/Shadow.py
Cython/Shadow.py
+5
-1
Cython/__init__.py
Cython/__init__.py
+1
-1
pyximport/pyximport.py
pyximport/pyximport.py
+5
-5
No files found.
Cython/Shadow.py
View file @
35f7f3d7
...
@@ -151,8 +151,12 @@ class typedef(CythonType):
...
@@ -151,8 +151,12 @@ class typedef(CythonType):
py_int
=
int
py_int
=
int
py_long
=
long
py_float
=
float
py_float
=
float
try
:
py_long
=
long
except
NameError
:
# Python 3
pass
# Predefined types
# Predefined types
...
...
Cython/__init__.py
View file @
35f7f3d7
# Void cython.* directives (for case insensitive operating systems).
# Void cython.* directives (for case insensitive operating systems).
from
Shadow
import
*
from
Cython.
Shadow
import
*
pyximport/pyximport.py
View file @
35f7f3d7
...
@@ -117,7 +117,7 @@ def handle_dependencies(pyxfilename):
...
@@ -117,7 +117,7 @@ def handle_dependencies(pyxfilename):
# be tricked into rebuilding it.
# be tricked into rebuilding it.
for
file
in
files
:
for
file
in
files
:
if
newer
(
file
,
pyxfilename
):
if
newer
(
file
,
pyxfilename
):
print
"Rebuilding because of "
,
file
print
(
"Rebuilding because of "
,
file
)
filetime
=
os
.
path
.
getmtime
(
file
)
filetime
=
os
.
path
.
getmtime
(
file
)
os
.
utime
(
pyxfilename
,
(
filetime
,
filetime
))
os
.
utime
(
pyxfilename
,
(
filetime
,
filetime
))
_test_files
.
append
(
file
)
_test_files
.
append
(
file
)
...
@@ -141,7 +141,7 @@ def build_module(name, pyxfilename, pyxbuild_dir=None):
...
@@ -141,7 +141,7 @@ def build_module(name, pyxfilename, pyxbuild_dir=None):
try
:
try
:
os
.
remove
(
path
)
os
.
remove
(
path
)
except
IOError
:
except
IOError
:
print
"Couldn't remove "
,
path
print
(
"Couldn't remove "
,
path
)
return
so_path
return
so_path
...
@@ -168,7 +168,7 @@ class PyxImporter(object):
...
@@ -168,7 +168,7 @@ class PyxImporter(object):
if
fullname
in
sys
.
modules
:
if
fullname
in
sys
.
modules
:
return
None
return
None
if
DEBUG_IMPORT
:
if
DEBUG_IMPORT
:
print
"SEARCHING"
,
fullname
,
package_path
print
(
"SEARCHING"
,
fullname
,
package_path
)
if
'.'
in
fullname
:
if
'.'
in
fullname
:
mod_parts
=
fullname
.
split
(
'.'
)
mod_parts
=
fullname
.
split
(
'.'
)
package
=
'.'
.
join
(
mod_parts
[:
-
1
])
package
=
'.'
.
join
(
mod_parts
[:
-
1
])
...
@@ -226,7 +226,7 @@ class PyImporter(PyxImporter):
...
@@ -226,7 +226,7 @@ class PyImporter(PyxImporter):
# prevent infinite recursion
# prevent infinite recursion
return
None
return
None
if
DEBUG_IMPORT
:
if
DEBUG_IMPORT
:
print
"trying import of module %s"
%
fullname
print
(
"trying import of module"
,
fullname
)
if
fullname
in
self
.
uncompilable_modules
:
if
fullname
in
self
.
uncompilable_modules
:
path
,
last_modified
=
self
.
uncompilable_modules
[
fullname
]
path
,
last_modified
=
self
.
uncompilable_modules
[
fullname
]
try
:
try
:
...
@@ -243,7 +243,7 @@ class PyImporter(PyxImporter):
...
@@ -243,7 +243,7 @@ class PyImporter(PyxImporter):
importer
=
self
.
super
.
find_module
(
fullname
,
package_path
)
importer
=
self
.
super
.
find_module
(
fullname
,
package_path
)
if
importer
is
not
None
:
if
importer
is
not
None
:
if
DEBUG_IMPORT
:
if
DEBUG_IMPORT
:
print
"importer found"
print
(
"importer found"
)
try
:
try
:
if
importer
.
init_path
:
if
importer
.
init_path
:
path
=
importer
.
init_path
path
=
importer
.
init_path
...
...
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