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
2b17a4ac
Commit
2b17a4ac
authored
Aug 06, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some glitches in last pyximport changes
parent
2000b13b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
pyximport/pyxbuild.py
pyximport/pyxbuild.py
+2
-2
pyximport/pyximport.py
pyximport/pyximport.py
+2
-1
No files found.
pyximport/pyxbuild.py
View file @
2b17a4ac
...
...
@@ -27,7 +27,7 @@ def pyx_to_dll(filename, ext = None, force_rebuild = 0,
or .dll ."""
assert
os
.
path
.
exists
(
filename
),
"Could not find %s"
%
os
.
path
.
abspath
(
filename
)
path
,
name
=
os
.
path
.
split
(
filename
)
path
,
name
=
os
.
path
.
split
(
os
.
path
.
abspath
(
filename
)
)
if
not
ext
:
modname
,
extension
=
os
.
path
.
splitext
(
name
)
...
...
@@ -40,7 +40,7 @@ def pyx_to_dll(filename, ext = None, force_rebuild = 0,
pyxbuild_dir
=
os
.
path
.
join
(
path
,
"_pyxbld"
)
package_base_dir
=
path
for
package_name
in
ext
.
name
.
split
(
'.'
)[
1
::
-
1
]:
for
package_name
in
ext
.
name
.
split
(
'.'
)[
-
2
::
-
1
]:
package_base_dir
,
pname
=
os
.
path
.
split
(
package_base_dir
)
if
pname
!=
package_name
:
# something is wrong - package path doesn't match file path
...
...
pyximport/pyximport.py
View file @
2b17a4ac
...
...
@@ -205,7 +205,7 @@ def load_module(name, pyxfilename, pyxbuild_dir=None, is_package=False,
inplace
=
build_inplace
,
language_level
=
language_level
)
mod
=
imp
.
load_dynamic
(
name
,
so_path
)
if
is_package
and
not
hasattr
(
mod
,
'__path__'
):
mod
.
__path__
=
os
.
path
.
dirname
(
so_path
)
mod
.
__path__
=
[
os
.
path
.
dirname
(
so_path
)]
assert
mod
.
__file__
==
so_path
,
(
mod
.
__file__
,
so_path
)
except
Exception
:
if
pyxargs
.
load_py_module_on_import_failure
and
pyxfilename
.
endswith
(
'.py'
):
...
...
@@ -381,6 +381,7 @@ class LibLoader(object):
source_path
,
so_path
,
is_package
=
self
.
_libs
[
fullname
]
except
KeyError
:
raise
ValueError
(
"invalid module %s"
%
fullname
)
_debug
(
"Loading shared library module '%s' from %s"
,
fullname
,
so_path
)
return
load_module
(
fullname
,
source_path
,
so_path
=
so_path
,
is_package
=
is_package
)
def
add_lib
(
self
,
fullname
,
path
,
so_path
,
is_package
):
...
...
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