python.include setting?
Michael Dickens
michaelld at macports.org
Tue Apr 9 08:20:52 PDT 2013
On Tue, Apr 9, 2013, at 11:01 AM, Jeremy Lavergne wrote:
> I believe the "m" should always be there for MacPorts versions because
> that's just how we build them, but there might be other letters if other
> things are enabled ("d" for debug, "u" for wide-unicode).
That's what I was guessing, too. Here's my first cut at the changes
("svn diff" of python-1.0 PortGroup):
{{{
Index: python-1.0.tcl
===================================================================
--- python-1.0.tcl (revision 105062)
+++ python-1.0.tcl (working copy)
@@ -200,7 +200,7 @@
default python.lib {[python_get_defaults lib]}
default python.pkgd {[python_get_defaults pkgd]}
default python.libdir {${python.prefix}/lib/python${python.branch}}
-default python.include
{${python.prefix}/include/python${python.branch}}
+default python.include {[python_get_defaults include]}
default build.cmd {"${python.bin} setup.py [python_get_defaults
setup_args]"}
default destroot.cmd {"${python.bin} setup.py [python_get_defaults
setup_args]"}
@@ -227,6 +227,24 @@
return "${prefix}/bin/python${python.branch}"
}
}
+ include {
+ set ret "${python.prefix}/include/python${python.branch}"
+ if {[file exists ${ret}]} {
+ return ${ret}
+ } else {
+ # look for "${ret}*" and pick the first one found;
+ # make assumptions if none are found
+ if {[catch {set dirs [glob ${ret}*]}]} {
+ if {${python.version} < 30} {
+ return ${ret}
+ } else {
+ return ${ret}m
+ }
+ } else {
+ return [lindex ${dirs} 0]
+ }
+ }
+ }
lib {
if {${python.version} != 24 && ${python.version} != 25} {
return "${python.prefix}/Python"
}}}
More information about the macports-dev
mailing list