classification
Title: compiling ctypes fails with non-ascii path
Type: compile error Stage: resolved
Components: Build, ctypes Versions: Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: theller Nosy List: doko, flox, pitrou, theller
Priority: high Keywords: buildbot, patch

Created on 2010-01-08 23:24 by pitrou, last changed 2010-03-21 20:59 by flox. This issue is now closed.

Files
File name Uploaded Description Edit
issue7661_ctypes_path_space.diff flox, 2010-01-10 19:01 Patch, apply to trunk
Messages (10)
msg97444 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-01-08 23:24
Traceback (most recent call last):
  File "./setup.py", line 1933, in <module>
    main()
  File "./setup.py", line 1928, in main
    'Lib/smtpd.py']
  File "/home/buildbot/cpython-ucs4-nonascii-€/trunk.pitrou-ubuntu-wide/build/Lib/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/home/buildbot/cpython-ucs4-nonascii-€/trunk.pitrou-ubuntu-wide/build/Lib/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/home/buildbot/cpython-ucs4-nonascii-€/trunk.pitrou-ubuntu-wide/build/Lib/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/buildbot/cpython-ucs4-nonascii-€/trunk.pitrou-ubuntu-wide/build/Lib/distutils/command/build.py", line 126, in run
    self.run_command(cmd_name)
  File "/home/buildbot/cpython-ucs4-nonascii-€/trunk.pitrou-ubuntu-wide/build/Lib/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/home/buildbot/cpython-ucs4-nonascii-€/trunk.pitrou-ubuntu-wide/build/Lib/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/buildbot/cpython-ucs4-nonascii-€/trunk.pitrou-ubuntu-wide/build/Lib/distutils/command/build_ext.py", line 396, in run
    self.build_extensions()
  File "./setup.py", line 192, in build_extensions
    build_ext.build_extensions(self)
  File "/home/buildbot/cpython-ucs4-nonascii-€/trunk.pitrou-ubuntu-wide/build/Lib/distutils/command/build_ext.py", line 506, in build_extensions
    self.build_extension(ext)
  File "./setup.py", line 226, in build_extension
    if not self.configure_ctypes(ext):
  File "./setup.py", line 1735, in configure_ctypes
    execfile(ffi_configfile, globals(), fficonfig)
  File "build/temp.linux-x86_64-2.7-pydebug/libffi/fficonfig.py", line 31
SyntaxError: Non-ASCII character '\xe2' in file build/temp.linux-x86_64-2.7-pydebug/libffi/fficonfig.py on line 31, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
[54530 refs]


See e.g. http://www.python.org/dev/buildbot/builders/AMD64%20Ubuntu%20wide%20trunk/builds/238/steps/compile/logs/stdio
msg97512 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-01-10 14:24
Patch attached.
msg97513 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-01-10 14:33
Fixed typo in previous patch.
msg97519 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-01-10 16:23
It fails if path contains space, too.

Additional patch fixes this case.
msg97521 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-01-10 16:41
The patch looks ok to me. Thomas, do you have any take on this?
msg97541 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-01-10 19:01
Updated: added quotes on line 2319.
msg97708 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-01-13 12:06
I've merged the first patch. The other one is a bit more controversial because it modifies a file from the original libffi. Besides, "configure" is auto-generated so you should modify configure.ac instead.
msg97878 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-01-16 13:25
Still failing: buildbot "AMD64 Ubuntu wide 2.6"

Revisions r77466 and r77467 need backport.
msg97890 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-01-16 18:17
Ok, I've merged the ctypes fix to 2.6. As for 3.1, it doesn't seem to need the fix.
msg101457 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-03-21 20:59
Now paths with spaces are explicitly rejected, after the upgrade to libffi 3.0.9. (Issue #8142)
History
Date User Action Args
2010-03-21 20:59:47floxsetstatus: open -> closed

nosy: + doko
messages: + msg101457

resolution: out of date
stage: patch review -> resolved
2010-01-16 18:17:38pitrousetmessages: + msg97890
2010-01-16 13:25:33floxsetkeywords: + buildbot

messages: + msg97878
2010-01-13 12:06:44pitrousetfiles: - issue7661_ctypes_path.diff
2010-01-13 12:06:37pitrousetmessages: + msg97708
2010-01-10 19:01:55floxsetfiles: - issue7661_ctypes_path_space.diff
2010-01-10 19:01:40floxsetfiles: + issue7661_ctypes_path_space.diff

messages: + msg97541
2010-01-10 16:41:06pitrousetmessages: + msg97521
2010-01-10 16:23:33floxsetfiles: + issue7661_ctypes_path_space.diff

messages: + msg97519
2010-01-10 14:33:34floxsetfiles: + issue7661_ctypes_path.diff

messages: + msg97513
2010-01-10 14:32:47floxsetfiles: - issue7661_ctypes_path.diff
2010-01-10 14:30:35floxsetcomponents: + Build, ctypes
2010-01-10 14:24:31floxsetfiles: + issue7661_ctypes_path.diff

versions: + Python 3.2
keywords: + patch
nosy: + flox

messages: + msg97512
stage: needs patch -> patch review
2010-01-08 23:24:56pitroucreate