pycairo 1.10.0 fails to build on CPython 3.4, because 3.4's python-config became a /bin/sh script. In CPython 3.3, python-config is a python script. This would be fine if python-config were allowed to get its interpreter via a #!, but pycairo tries to run the script via a python interpreter explicitly, which of course produces a syntax error. The error looks like: Checking for program python3.4-config : /usr/local/cpython-3.4/bin/python-config command ['/usr/local/cpython-3.4/bin/python', '/usr/local/cpython-3.4/bin/python-config', '--includes'] returned 1 ./options() ./configure() And the beginning of 3.4's python-config: $ head /usr/local/cpython-3.4/bin/python-config #!/bin/sh # Keep this script in sync with python-config.in exit_with_usage () { echo "Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir" exit $1 } But the beginning of 3.3's python-config looks like: $ head /usr/local/cpython-3.3/bin/python-config #!/usr/local/cpython-3.3/bin/python3.3m # -*- python -*- import getopt import os import sys import sysconfig valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', 'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir'] Thanks.
I ran into this also though with 2.7. My python2.7-config was a csh script. I copied a python2.7-config from another ubuntu system that was python and overwrote the csh version and then was able to install.
I have been building pycairo 1.10.1 just fine for Python 3.2, 3.3 and 3.4. So let me suggest this bug report is obsolete.
This issue is certainly still relevant in some environments. Building on NetBSD fails with: command ['/usr/pkg/bin/python3.4', '/usr/pkg/bin/python3.4-config', '--includes'] returned 1 *** Error code 1 That is, it fails unless this is patched around, as it is via pkgsrc.org.
This bug is certainly still present and prevents building pycairo on Void Linux using CPython3.4.
In case this helps anyone else, the pkgsrc.org patch to work around this problem is here: http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/graphics/py-cairo3/patches/patch-.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6_waflib_Tools_python.py?rev=1.1&content-type=text/plain&only_with_tag=MAIN The issue is caused by waf assuming that python-config is a python script. Modifying its code so it calls python-config without prepending a path to the python interpreter fixes the issue.
Since 1.11 pycairo uses distutils for building. If there are any problems with the new system please file a bug: https://github.com/pygobject/pycairo/issues
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.