Python34 include directory problems
Michael Dickens
michaelld at macports.org
Mon Jul 6 07:35:46 PDT 2015
After updating py34-pyqt4 to use dbus-python34, all of the buildbots
failed to build this port, with:
{{{
configure.py: error:
"/opt/local/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/dbus-1.0"
is not a directory
}}}
This port builds cleanly for me on 10.8 (latest; latest Xcode too);
py27-pyqt4 builds cleanly for me as well as on the buildbots. The
dbus-1.0 directory is specified in the py-pyqt4 Portfile via:
{{{
configure.args-append --dbus=${python.include}/dbus-1.0
}}}
So, this lead me to believe that something was up with
${python.include}. A little sleuthing brought me to the code found at
dports/_resources/port1.0/group/python-1.0.tcl:232-247, when determining
the default value for python.include:
{{{
set inc_dir
"${python.prefix}/include/python${python.branch}"
if {[file exists ${inc_dir}]} {
return ${inc_dir}
} else {
# look for "${inc_dir}*" and pick the first one found;
# make assumptions if none are found
if {[catch {set inc_dirs [glob ${inc_dir}*]}]} {
if {${python.version} < 30} {
return ${inc_dir}
} else {
return ${inc_dir}m
}
} else {
return [lindex ${inc_dirs} 0]
}
}
}}}
For Python27, the "m" version does not exist; all of the headers are in
the same directory, both on my system and on the buildbots.
For Python34, on my system as well as on the buildbots (from the log),
both the plain and "m" versions of ${python.include} do exist. Even
worse is that on my system for Python34, sip.h is in the non-"m" version
while on the buildbots it is in the "m" version.
This inconsistent include directory is a real problem. There should be
just 1 include directory to use, pick the name and go with it and we
should enforce it's usage either by appropriate configure settings or
post-destroot file movement. I don't care which directory is used,
though without the "m" would be easiest -- no need for an "if
{${python.version} < 30}" statement, just set the include directory &
go! That said, I think Python34 uses the "m" by default; so, we could
too. Thoughts? - MLD
More information about the macports-dev
mailing list