[MacPorts] #32840: python portgroup: strange results from python_get_version

MacPorts noreply at macports.org
Tue Jan 10 11:31:45 PST 2012


#32840: python portgroup: strange results from python_get_version
-------------------------------------+--------------------------------------
 Reporter:  ryandesign@…             |       Owner:  macports-tickets@…                   
     Type:  defect                   |      Status:  new                                  
 Priority:  Normal                   |   Milestone:                                       
Component:  ports                    |     Version:  2.0.3                                
 Keywords:                           |        Port:  python                               
-------------------------------------+--------------------------------------
 The unified python portgroup has this code:
 {{{
 proc python_get_version {} {
     if {[string match py-* [option name]]} {
         return [string range [option subport] 2 3]
     } else {
         return [option python.default_version]
     }
 }
 }}}
 This is strange and produces bizarre dependencies like this:
 {{{
 $ port deps py-urlwatch
 Full Name: py-urlwatch @1.14_0
 Library Dependencies: py-u-futures
 }}}
 In fact py-urlwatch declares a dependency on
 port:py${python.version}-futures. In the stub port, python.version is the
 3rd and 4th characters of the port name (for "py-urlwatch", that's "-u").
 In the non-stub ports, it takes the default version. This seems exactly
 backwards doesn't it? Shouldn't the condition be:
 {{{
 if {![string match py-* [option name]]} {
 }}}
 Or perhaps rather:
 {{{
 if {[string match py\[0-9\]\[0-9\]-* [option name]]} {
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/32840>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list