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
c2f4d1be
Commit
c2f4d1be
authored
Feb 13, 2009
by
Tarek Ziadé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed #4524: distutils build_script command failed with --with-suffix=3
parent
fcbbe9c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
command/build_scripts.py
command/build_scripts.py
+2
-2
tests/test_build_scripts.py
tests/test_build_scripts.py
+28
-0
No files found.
command/build_scripts.py
View file @
c2f4d1be
...
...
@@ -102,8 +102,8 @@ class build_scripts (Command):
outf
.
write
(
"#!%s%s
\
n
"
%
(
os
.
path
.
join
(
sysconfig
.
get_config_var
(
"BINDIR"
),
"python"
+
sysconfig
.
get_config_var
(
"VERSION"
)
+
sysconfig
.
get_config_var
(
"EXE"
)),
"python%s%s"
%
(
sysconfig
.
get_config_var
(
"VERSION"
),
sysconfig
.
get_config_var
(
"EXE"
)
)),
post_interp
))
outf
.
writelines
(
f
.
readlines
())
outf
.
close
()
...
...
tests/test_build_scripts.py
View file @
c2f4d1be
...
...
@@ -5,6 +5,7 @@ import unittest
from
distutils.command.build_scripts
import
build_scripts
from
distutils.core
import
Distribution
from
distutils
import
sysconfig
from
distutils.tests
import
support
...
...
@@ -73,6 +74,33 @@ class BuildScriptsTestCase(support.TempdirManager,
f
.
write
(
text
)
f
.
close
()
def
test_version_int
(
self
):
source
=
self
.
mkdtemp
()
target
=
self
.
mkdtemp
()
expected
=
self
.
write_sample_scripts
(
source
)
cmd
=
self
.
get_build_scripts_cmd
(
target
,
[
os
.
path
.
join
(
source
,
fn
)
for
fn
in
expected
])
cmd
.
finalize_options
()
# http://bugs.python.org/issue4524
#
# On linux-g++-32 with command line `./configure --enable-ipv6
# --with-suffix=3`, python is compiled okay but the build scripts
# failed when writing the name of the executable
old
=
sysconfig
.
_config_vars
.
get
(
'VERSION'
)
sysconfig
.
_config_vars
[
'VERSION'
]
=
4
try
:
cmd
.
run
()
finally
:
if
old
is
not
None
:
sysconfig
.
_config_vars
[
'VERSION'
]
=
old
built
=
os
.
listdir
(
target
)
for
name
in
expected
:
self
.
assert_
(
name
in
built
)
def
test_suite
():
return
unittest
.
makeSuite
(
BuildScriptsTestCase
)
...
...
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