Ignore:
Timestamp:
Apr 10, 2013, 12:28:56 PM (6 years ago)
Author:
michaelld@…
Message:

python-1.0 PortGroup: Fix python.include to be correct for both Python2 and Python3. In the latter the naming scheme depends on the build options, while with the former the naming scheme is fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/python-1.0.tcl

    r101542 r105101  
    201201default python.pkgd {[python_get_defaults pkgd]}
    202202default python.libdir {${python.prefix}/lib/python${python.branch}}
    203 default python.include  {${python.prefix}/include/python${python.branch}}
     203default python.include  {[python_get_defaults include]}
    204204
    205205default build.cmd       {"${python.bin} setup.py [python_get_defaults setup_args]"}
     
    228228            }
    229229        }
     230        include {
     231            set inc_dir "${python.prefix}/include/python${python.branch}"
     232            if {[file exists ${inc_dir}]} {
     233                return ${inc_dir}
     234            } else {
     235                # look for "${inc_dir}*" and pick the first one found;
     236                # make assumptions if none are found
     237                if {[catch {set inc_dirs [glob ${inc_dir}*]}]} {
     238                    if {${python.version} < 30} {
     239                        return ${inc_dir}
     240                    } else {
     241                        return ${inc_dir}m
     242                    }
     243                } else {
     244                    return [lindex ${inc_dirs} 0]
     245                }
     246            }
     247        }
    230248        lib {
    231249            if {${python.version} != 24 && ${python.version} != 25} {
Note: See TracChangeset for help on using the changeset viewer.