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
f84b2a99
Commit
f84b2a99
authored
Jan 24, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
05d0a375
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
pyximport/pyximport.py
pyximport/pyximport.py
+6
-7
No files found.
pyximport/pyximport.py
View file @
f84b2a99
...
...
@@ -140,12 +140,11 @@ def load_module(name, pyxfilename):
# import hooks
class
PyxImporter
(
object
):
def
__init__
(
self
,
so_cache_dir
):
self
.
so_cache_dir
=
so_cache_dir
self
.
so_name_cache
=
{}
def
__init__
(
self
):
pass
def
find_module
(
self
,
fullname
,
package_path
=
None
):
print
"SEARCHING"
,
fullname
,
package_path
#
print "SEARCHING", fullname, package_path
if
'.'
in
fullname
:
mod_parts
=
fullname
.
split
(
'.'
)
package
=
'.'
.
join
(
mod_parts
[:
-
1
])
...
...
@@ -186,11 +185,11 @@ class PyxLoader(object):
self
.
fullname
,
fullname
))
if
self
.
init_path
:
# package
print
"PACKAGE"
,
fullname
#
print "PACKAGE", fullname
module
=
load_module
(
fullname
,
self
.
init_path
)
module
.
__path__
=
[
self
.
path
]
else
:
print
"MODULE"
,
fullname
#
print "MODULE", fullname
module
=
load_module
(
fullname
,
self
.
path
)
return
module
...
...
@@ -204,7 +203,7 @@ def install():
for
importer
in
sys
.
meta_path
:
if
isinstance
(
importer
,
PyxImporter
):
return
importer
=
PyxImporter
(
'~/.pyxbuild'
)
importer
=
PyxImporter
(
)
# (
'~/.pyxbuild')
sys
.
meta_path
.
append
(
importer
)
...
...
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