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
adf3c18b
Commit
adf3c18b
authored
Nov 14, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whitespace fixes
parent
d6aa0e99
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
pyximport/pyximport.py
pyximport/pyximport.py
+8
-10
No files found.
pyximport/pyximport.py
View file @
adf3c18b
...
@@ -122,9 +122,8 @@ def handle_special_build(modname, pyxfilename):
...
@@ -122,9 +122,8 @@ def handle_special_build(modname, pyxfilename):
make_ext
=
getattr
(
mod
,
'make_ext'
,
None
)
make_ext
=
getattr
(
mod
,
'make_ext'
,
None
)
if
make_ext
:
if
make_ext
:
ext
=
make_ext
(
modname
,
pyxfilename
)
ext
=
make_ext
(
modname
,
pyxfilename
)
assert
ext
and
ext
.
sources
,
(
"make_ext in %s did not return Extension"
assert
ext
and
ext
.
sources
,
"make_ext in %s did not return Extension"
%
special_build
%
special_build
)
make_setup_args
=
getattr
(
mod
,
'make_setup_args'
,
None
)
make_setup_args
=
getattr
(
mod
,
'make_setup_args'
,
None
)
if
make_setup_args
:
if
make_setup_args
:
setup_args
=
make_setup_args
()
setup_args
=
make_setup_args
()
assert
isinstance
(
setup_args
,
dict
),
(
"make_setup_args in %s did not return a dict"
assert
isinstance
(
setup_args
,
dict
),
(
"make_setup_args in %s did not return a dict"
...
@@ -175,15 +174,14 @@ def handle_dependencies(pyxfilename):
...
@@ -175,15 +174,14 @@ def handle_dependencies(pyxfilename):
def
build_module
(
name
,
pyxfilename
,
pyxbuild_dir
=
None
,
inplace
=
False
,
language_level
=
None
):
def
build_module
(
name
,
pyxfilename
,
pyxbuild_dir
=
None
,
inplace
=
False
,
language_level
=
None
):
assert
os
.
path
.
exists
(
pyxfilename
),
(
assert
os
.
path
.
exists
(
pyxfilename
),
"Path does not exist: %s"
%
pyxfilename
"Path does not exist: %s"
%
pyxfilename
)
handle_dependencies
(
pyxfilename
)
handle_dependencies
(
pyxfilename
)
extension_mod
,
setup_args
=
get_distutils_extension
(
name
,
pyxfilename
,
language_level
)
extension_mod
,
setup_args
=
get_distutils_extension
(
name
,
pyxfilename
,
language_level
)
build_in_temp
=
pyxargs
.
build_in_temp
build_in_temp
=
pyxargs
.
build_in_temp
sargs
=
pyxargs
.
setup_args
.
copy
()
sargs
=
pyxargs
.
setup_args
.
copy
()
sargs
.
update
(
setup_args
)
sargs
.
update
(
setup_args
)
build_in_temp
=
sargs
.
pop
(
'build_in_temp'
,
build_in_temp
)
build_in_temp
=
sargs
.
pop
(
'build_in_temp'
,
build_in_temp
)
from
.
import
pyxbuild
from
.
import
pyxbuild
so_path
=
pyxbuild
.
pyx_to_dll
(
pyxfilename
,
extension_mod
,
so_path
=
pyxbuild
.
pyx_to_dll
(
pyxfilename
,
extension_mod
,
...
@@ -197,7 +195,7 @@ def build_module(name, pyxfilename, pyxbuild_dir=None, inplace=False, language_l
...
@@ -197,7 +195,7 @@ def build_module(name, pyxfilename, pyxbuild_dir=None, inplace=False, language_l
junkpath
=
os
.
path
.
join
(
os
.
path
.
dirname
(
so_path
),
name
+
"_*"
)
#very dangerous with --inplace ? yes, indeed, trying to eat my files ;)
junkpath
=
os
.
path
.
join
(
os
.
path
.
dirname
(
so_path
),
name
+
"_*"
)
#very dangerous with --inplace ? yes, indeed, trying to eat my files ;)
junkstuff
=
glob
.
glob
(
junkpath
)
junkstuff
=
glob
.
glob
(
junkpath
)
for
path
in
junkstuff
:
for
path
in
junkstuff
:
if
path
!=
so_path
:
if
path
!=
so_path
:
try
:
try
:
os
.
remove
(
path
)
os
.
remove
(
path
)
except
IOError
:
except
IOError
:
...
...
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