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
Boxiang Sun
cython
Commits
1fe2e10c
Commit
1fe2e10c
authored
Aug 06, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reimplement 'inplace' option in pyxbuild, fix last commit
parent
d918a5a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
pyximport/pyxbuild.py
pyximport/pyxbuild.py
+11
-2
No files found.
pyximport/pyxbuild.py
View file @
1fe2e10c
...
...
@@ -39,6 +39,14 @@ def pyx_to_dll(filename, ext = None, force_rebuild = 0,
if
not
pyxbuild_dir
:
pyxbuild_dir
=
os
.
path
.
join
(
path
,
"_pyxbld"
)
package_base_dir
=
path
for
package_name
in
ext
.
name
.
split
(
'.'
)[
1
::
-
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
package_base_dir
=
None
break
script_args
=
setup_args
.
get
(
"script_args"
,[])
if
DEBUG
or
"--verbose"
in
script_args
:
quiet
=
"--verbose"
...
...
@@ -47,8 +55,8 @@ def pyx_to_dll(filename, ext = None, force_rebuild = 0,
args
=
[
quiet
,
"build_ext"
]
if
force_rebuild
:
args
.
append
(
"--force"
)
if
inplace
:
args
.
append
(
"--inplace"
)
if
inplace
and
package_base_dir
:
args
.
extend
([
'--build_lib'
,
package_base_dir
]
)
if
HAS_CYTHON
and
build_in_temp
:
args
.
append
(
"--pyrex-c-in-temp"
)
sargs
=
setup_args
.
copy
()
...
...
@@ -87,6 +95,7 @@ def pyx_to_dll(filename, ext = None, force_rebuild = 0,
try
:
obj_build_ext
=
dist
.
get_command_obj
(
"build_ext"
)
dist
.
run_commands
()
so_path
=
obj_build_ext
.
get_outputs
()[
0
]
if
obj_build_ext
.
inplace
:
# Python distutils get_outputs()[ returns a wrong so_path
# when --inplace ; see http://bugs.python.org/issue5977
...
...
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