python.include setting?
Jeremy Lavergne
jeremy at lavergne.gotdns.org
Tue Apr 9 10:12:52 PDT 2013
> 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"
> }}}
Here's goes my rusty Tcl-ese: we're doing a glob for pythonX.Y*, which is good. But why the nested if/then? Either we found something or didn't.
More information about the macports-dev
mailing list