classification
Title: Build fails at running build_scripts
Type: compile error Stage: patch review
Components: Build, Distutils Versions: Python 3.0, Python 3.1, Python 2.7, Python 2.6
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: tarek Nosy List: amaury.forgeotdarc, chaz6, tarek
Priority: high Keywords: needs review, patch

Created on 2008-12-04 15:42 by chaz6, last changed 2009-02-21 22:46 by tarek. This issue is now closed.

Files
File name Uploaded Description Edit
build_scripts.patch amaury.forgeotdarc, 2008-12-04 16:15
Messages (5)
msg76889 - (view) Author: Chris Hills (chaz6) Date: 2008-12-04 15:42
On linux-g++-32 with command line `./configure --enable-ipv6 --with-
suffix=3`, python is compiled okay but the build scripts fail as 
follows:-

running build_scripts
copying and adjusting /tmp/Python-3.0/Tools/scripts/idle -> build/
scripts-3.0
Traceback (most recent call last):
  File "./setup.py", line 1533, in <module>
    main()
  File "./setup.py", line 1528, in main
    'Lib/smtpd.py']
  File "/tmp/Python-3.0/Lib/distutils/core.py", line 149, in setup
    dist.run_commands()
  File "/tmp/Python-3.0/Lib/distutils/dist.py", line 942, in 
run_commands
    self.run_command(cmd)
  File "/tmp/Python-3.0/Lib/distutils/dist.py", line 962, in run_command
    cmd_obj.run()
  File "/tmp/Python-3.0/Lib/distutils/command/build.py", line 128, in 
run
    self.run_command(cmd_name)
  File "/tmp/Python-3.0/Lib/distutils/cmd.py", line 317, in run_command
    self.distribution.run_command(command)
  File "/tmp/Python-3.0/Lib/distutils/dist.py", line 962, in run_command
    cmd_obj.run()
  File "/tmp/Python-3.0/Lib/distutils/command/build_scripts.py", line 
51, in run
    self.copy_scripts()
  File "/tmp/Python-3.0/Lib/distutils/command/build_scripts.py", line 
108, in copy_scripts
    + sysconfig.get_config_var("EXE")),
TypeError: Can't convert 'int' object to str implicitly
make: *** [sharedmods] Error 1
msg76891 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-12-04 16:15
The cause is that distutils.sysconfig.parse_makefile() tries to convert
each value to an int, and does succeed on "--with-suffix=3".

The attached patch uses %s formatting to build the program name, this
will accept int values.
All versions are affected.
msg76927 - (view) Author: Chris Hills (chaz6) Date: 2008-12-04 20:54
In hindsight I did not need to use --with-suffix as I assumed the 
interpreter would be installed as "python" by default, but it is not. 
The patch however does fix the reported problem for me.
msg79048 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-01-04 11:56
I will write an isolated test in distutils to reproduce this issue,
msg82587 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-02-21 22:46
fixed in r69598. Thanks for the patch Amaury.
History
Date User Action Args
2009-02-21 22:46:55tareksetstatus: open -> closed
messages: + msg82587
2009-02-13 23:00:10tareksetversions: + Python 3.1, Python 2.7
2009-02-13 22:29:03tareksetpriority: high
2009-01-04 11:56:20tareksetassignee: tarek
messages: + msg79048
components: + Distutils
nosy: + tarek
2008-12-04 20:54:32chaz6setmessages: + msg76927
2008-12-04 16:15:38amaury.forgeotdarcsetfiles: + build_scripts.patch
versions: + Python 2.6
nosy: + amaury.forgeotdarc
messages: + msg76891
keywords: + needs review, patch
stage: patch review
2008-12-04 15:42:21chaz6create