Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
d48f2292
Commit
d48f2292
authored
Oct 21, 2010
by
Éric Araujo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport fix for #10126
parent
04895087
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
tests/test_build_ext.py
tests/test_build_ext.py
+15
-0
No files found.
tests/test_build_ext.py
View file @
d48f2292
...
@@ -49,6 +49,20 @@ class BuildExtTestCase(support.TempdirManager,
...
@@ -49,6 +49,20 @@ class BuildExtTestCase(support.TempdirManager,
sys
.
platform
==
'cygwin'
)
sys
.
platform
==
'cygwin'
)
super
(
BuildExtTestCase
,
self
).
tearDown
()
super
(
BuildExtTestCase
,
self
).
tearDown
()
def
_fixup_command
(
self
,
cmd
):
# When Python was build with --enable-shared, -L. is not good enough
# to find the libpython<blah>.so. This is because regrtest runs it
# under a tempdir, not in the top level where the .so lives. By the
# time we've gotten here, Python's already been chdir'd to the
# tempdir.
#
# To further add to the fun, we can't just add library_dirs to the
# Extension() instance because that doesn't get plumbed through to the
# final compiler command.
if
not
sys
.
platform
.
startswith
(
'win'
):
library_dir
=
sysconfig
.
get_config_var
(
'srcdir'
)
cmd
.
library_dirs
=
[(
'.'
if
library_dir
is
None
else
library_dir
)]
@
unittest
.
skipIf
(
not
os
.
path
.
exists
(
_XX_MODULE_PATH
),
@
unittest
.
skipIf
(
not
os
.
path
.
exists
(
_XX_MODULE_PATH
),
'xxmodule.c not found'
)
'xxmodule.c not found'
)
def
test_build_ext
(
self
):
def
test_build_ext
(
self
):
...
@@ -58,6 +72,7 @@ class BuildExtTestCase(support.TempdirManager,
...
@@ -58,6 +72,7 @@ class BuildExtTestCase(support.TempdirManager,
dist
=
Distribution
({
'name'
:
'xx'
,
'ext_modules'
:
[
xx_ext
]})
dist
=
Distribution
({
'name'
:
'xx'
,
'ext_modules'
:
[
xx_ext
]})
dist
.
package_dir
=
self
.
tmp_dir
dist
.
package_dir
=
self
.
tmp_dir
cmd
=
build_ext
(
dist
)
cmd
=
build_ext
(
dist
)
self
.
_fixup_command
(
cmd
)
if
os
.
name
==
"nt"
:
if
os
.
name
==
"nt"
:
# On Windows, we must build a debug version iff running
# On Windows, we must build a debug version iff running
# a debug build of Python
# a debug build of Python
...
...
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