> On Nov 18, 2014, at 9:11 AM, [email protected] wrote:
> 
> Revision
> 128284
> Author
> [email protected]
> Date
> 2014-11-18 07:11:25 -0800 (Tue, 18 Nov 2014)
> Log Message
> 
> py-nltk: update to 3.0.0
> Modified Paths
> 
>       • trunk/dports/python/py-nltk/Portfile
>       • trunk/dports/python/py-nltk3/Portfile
> Removed Paths
> 
>       • trunk/dports/python/py-nltk/files/
> Diff
> 
> Modified: trunk/dports/python/py-nltk/Portfile (128283 => 128284)
> 
> --- trunk/dports/python/py-nltk/Portfile      2014-11-18 14:17:34 UTC (rev 
> 128283)
> +++ trunk/dports/python/py-nltk/Portfile      2014-11-18 15:11:25 UTC (rev 
> 128284)
> @@ -5,7 +5,7 @@
>  PortGroup           github 1.0
>  PortGroup           python 1.0
>  
> -github.setup        nltk nltk 2.0.4
> +github.setup        nltk nltk 3.0.0
>  name                py-nltk

> -python.versions     26 27
> +python.versions     26 27 32 33 34

> --- trunk/dports/python/py-nltk3/Portfile     2014-11-18 14:17:34 UTC (rev 
> 128283)
> +++ trunk/dports/python/py-nltk3/Portfile     2014-11-18 15:11:25 UTC (rev 
> 128284)
> @@ -6,10 +6,21 @@
>  
>  name                py-nltk3
>  version             3.0a4
> +revision            1
>  categories-append   textproc
>  maintainers         hum openmaintainer
>  supported_archs     noarch
>  
> +replaced_by         py${python.version}-nltk
> +livecheck.type      none
> +
> +pre-configure {
> +    ui_error "Please do not install this port since it has been replaced by 
> 'py${python.version}-ntlk'."
> +    return -code error
> +}

> -python.versions     26 27 32 33 34

This doesn't work.

Previously, there existed the ports:

py-nltk3
py26-nltk3
py27-nltk3
py32-nltk3
py33-nltk3
py34-nltk3

Now, because you removed python.versions, there exists only py-nltk3, leaving 
the users of the now-removed subports stranded without an upgrade path.

Further, ${python.version} is not meant to be used when ${name} equals 
${subport}, but you are using it in that case. ${python.version} is implemented 
very simply, as the 3rd and 4th characters of the subport name, which in the 
case of the subport "py-nltk3" means ${python.version} is equal to "-n", which 
means that py-nltk3 is being replaced by "py-n-nltk" which is not correct.


$ port info py-nltk3 | head -n 2
py-nltk3 @3.0a4_1 (python, textproc)
Replaced by:          py-n-nltk


You need to continue to define the old subports, and handle the correct 
replacement of each subport, and the main port.

Several python ports have been replaced in the past; you should be able to find 
an example you can copy in one of those ports.


_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to