[MacPorts] #41768: py-radical-utils @0.5.0: new port
#41768: py-radical-utils @0.5.0: new port -----------------------------+-------------------------------- Reporter: Peter.Danecek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Keywords: | Port: py-radical-utils -----------------------------+-------------------------------- This new port is necessary for the update of `py-saga` which introduces this dependences in 0.9.14/0.9.15. The package is documented to work with Python 2.5, 2.6 & 2.7, this port provides only support for Python 2.6 and 2.7. {{{ Sub-ports: py26-radical-utils, py27-radical-utils Description: This Python package contains shared code and tools for various Radical Group projects. Sometimes we call it the Radical Kitchen Sink. Homepage: https://github.com/saga-project/radical.utils/ Library Dependencies: py27-radical-utils Platforms: darwin License: MIT Maintainers: Peter.Danecek@bo.ingv.it, openmaintainer@macports.org }}} -- Ticket URL: <https://trac.macports.org/ticket/41768> MacPorts <http://www.macports.org/> Ports system for OS X
#41768: py-radical-utils @0.5.0: new port -------------------------------+-------------------------------- Reporter: Peter.Danecek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-radical-utils | -------------------------------+-------------------------------- Comment (by ryandesign@…): Thanks. {{{ post-destroot { set dest_doc ${destroot}${prefix}/share/doc/${subport} xinstall -d ${dest_doc} xinstall -m 755 -W ${worksrcpath} \ CHANGES.md \ LICENSE.md \ README.md \ ${dest_doc} delete ${dest_doc}/examples copy ${worksrcpath}/examples ${dest_doc}/examples } } }}} I was wondering why you did "`delete ${dest_doc}/examples`" but I see now it's to delete the directory the portgroup creates. {{{ set dot_count [regexp -all \\. $version] livecheck.type regex livecheck.url ${master_sites} livecheck.regex ">${_name}-(\\d+(\\.\\d+){${dot_count}})\\${extract.suffix}<" }}} The problem with this is that this will only find versions that have the same number of components as the current version. The current version is "0.5.0" so `dot_count` will be 2 so `livecheck.regex` will contain "`(\\d+(\\.\\d+){2})`" and you won't find any versions that have more or fewer components, at which point you may as well just write "2" into `livecheck.regex` and dispense with the `dot_count` calculation. If that's not what you intended—if you want to match an arbitrary number of version number components, which I recommend since you never know what future version numbers will be—then try "`+`" (meaning "one or more of the preceding") instead of "`{${dot_count}}`". -- Ticket URL: <https://trac.macports.org/ticket/41768#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#41768: py-radical-utils @0.5.0: new port -------------------------------+-------------------------------- Reporter: Peter.Danecek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-radical-utils | -------------------------------+-------------------------------- Comment (by Peter.Danecek@…): Replying to [comment:1 ryandesign@…]:
Thanks.
{{{ post-destroot { set dest_doc ${destroot}${prefix}/share/doc/${subport} xinstall -d ${dest_doc} xinstall -m 755 -W ${worksrcpath} \ CHANGES.md \ LICENSE.md \ README.md \ ${dest_doc}
delete ${dest_doc}/examples copy ${worksrcpath}/examples ${dest_doc}/examples } } }}}
I was wondering why you did "`delete ${dest_doc}/examples`" but I see now it's to delete the directory the portgroup creates.
Well, this is something I already addressed on the list. I personally do not thing it is really helpful that this directory is created by the portgroup. From what I have seen so far, there is often a examples directory you just would like to copy, but this leads to somewhat unexpected results, ie. leaving you with directory hierarchy like ${prefix}/share/${subport}/doc/examples/examples/ But, I imaging changing this now might break some python ports.
{{{ set dot_count [regexp -all \\. $version]
livecheck.type regex livecheck.url ${master_sites} livecheck.regex
">${_name}-(\\d+(\\.\\d+){${dot_count}})\\${extract.suffix}<"
}}}
The problem with this is that this will only find versions that have the same number of components as the current version. The current version is "0.5.0" so `dot_count` will be 2 so `livecheck.regex` will contain "`(\\d+(\\.\\d+){2})`" and you won't find any versions that have more or fewer components, at which point you may as well just write "2" into `livecheck.regex` and dispense with the `dot_count` calculation. If that's not what you intended—if you want to match an arbitrary number of version number components, which I recommend since you never know what future version numbers will be—then try "`+`" (meaning "one or more of the preceding") instead of "`{${dot_count}}`".
Okay, I see your point. My assumption here was really that the versioning scheme would not change and I used to hardcode the regex to match exactly the same scheme. The idea was if the scheme changes there also might be a some discontinuity in numbering which couldn't be handled automatically anyway. Now I wanted a generic template which would take care of this with less changes. But your are probably right, this might be an overkill and there is no point in doing so. One could just match anything from 1 to n dots and that's it. -- Ticket URL: <https://trac.macports.org/ticket/41768#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#41768: py-radical-utils @0.5.0: new port -------------------------------+-------------------------------- Reporter: Peter.Danecek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-radical-utils | -------------------------------+-------------------------------- Comment (by ryandesign@…): A lot of ports use `(\\d+(\\.\\d+)+)` in their `livecheck.regex` When I'm writing it I usually go for the less precise but shorter `(\[0-9.\]+)` -- Ticket URL: <https://trac.macports.org/ticket/41768#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#41768: py-radical-utils @0.5.0: new port -------------------------------+-------------------------------- Reporter: Peter.Danecek@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: py-radical-utils | -------------------------------+-------------------------------- Comment (by Peter.Danecek@…): I simplified the livecheck regex and updated the Portfile. -- Ticket URL: <https://trac.macports.org/ticket/41768#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#41768: py-radical-utils @0.5.0: new port -------------------------------+-------------------------------- Reporter: Peter.Danecek@… | Owner: macports-tickets@… Type: submission | Status: closed Priority: Normal | Milestone: Component: ports | Version: Resolution: fixed | Keywords: Port: py-radical-utils | -------------------------------+-------------------------------- Changes (by mojca@…): * status: new => closed * resolution: => fixed Comment: Committed in r115024. -- Ticket URL: <https://trac.macports.org/ticket/41768#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts