[MacPorts] #41768: py-radical-utils @0.5.0: new port
MacPorts
noreply at macports.org
Wed Dec 11 14:39:32 PST 2013
#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
More information about the macports-tickets
mailing list