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
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
Hide 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):
make_ext
=
getattr
(
mod
,
'make_ext'
,
None
)
if
make_ext
:
ext
=
make_ext
(
modname
,
pyxfilename
)
assert
ext
and
ext
.
sources
,
(
"make_ext in %s did not return Extension"
%
special_build
)
make_setup_args
=
getattr
(
mod
,
'make_setup_args'
,
None
)
assert
ext
and
ext
.
sources
,
"make_ext in %s did not return Extension"
%
special_build
make_setup_args
=
getattr
(
mod
,
'make_setup_args'
,
None
)
if
make_setup_args
:
setup_args
=
make_setup_args
()
assert
isinstance
(
setup_args
,
dict
),
(
"make_setup_args in %s did not return a dict"
...
...
@@ -175,15 +174,14 @@ def handle_dependencies(pyxfilename):
def
build_module
(
name
,
pyxfilename
,
pyxbuild_dir
=
None
,
inplace
=
False
,
language_level
=
None
):
assert
os
.
path
.
exists
(
pyxfilename
),
(
"Path does not exist: %s"
%
pyxfilename
)
assert
os
.
path
.
exists
(
pyxfilename
),
"Path does not exist: %s"
%
pyxfilename
handle_dependencies
(
pyxfilename
)
extension_mod
,
setup_args
=
get_distutils_extension
(
name
,
pyxfilename
,
language_level
)
build_in_temp
=
pyxargs
.
build_in_temp
sargs
=
pyxargs
.
setup_args
.
copy
()
extension_mod
,
setup_args
=
get_distutils_extension
(
name
,
pyxfilename
,
language_level
)
build_in_temp
=
pyxargs
.
build_in_temp
sargs
=
pyxargs
.
setup_args
.
copy
()
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
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
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
)
for
path
in
junkstuff
:
if
path
!=
so_path
:
if
path
!=
so_path
:
try
:
os
.
remove
(
path
)
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