[84845] trunk/dports/python

jmr at macports.org jmr at macports.org
Mon Oct 3 08:45:58 PDT 2011


Revision: 84845
          http://trac.macports.org/changeset/84845
Author:   jmr at macports.org
Date:     2011-10-03 08:45:57 -0700 (Mon, 03 Oct 2011)
Log Message:
-----------
unify py*-docutils (#31421), part 2

Modified Paths:
--------------
    trunk/dports/python/py-docutils/Portfile

Added Paths:
-----------
    trunk/dports/python/py-docutils/

Removed Paths:
-------------
    trunk/dports/python/py27-docutils/

Modified: trunk/dports/python/py-docutils/Portfile
===================================================================
--- trunk/dports/python/py27-docutils/Portfile	2011-10-03 11:36:00 UTC (rev 84838)
+++ trunk/dports/python/py-docutils/Portfile	2011-10-03 15:45:57 UTC (rev 84845)
@@ -2,13 +2,13 @@
 # $Id$
 
 PortSystem 1.0
-PortGroup python27 1.0
+PortGroup python 1.0
 
-name                py27-docutils
+name                py-docutils
 version             0.8.1
 categories-append   textproc
 license             GPL-3+ PSF-2.1.1 BSD
-maintainers         jmr openmaintainer
+maintainers         jmr alexnicksay.com:alex openmaintainer
 description         A set of tools for processing plaintext documentation
 long_description    Docutils is a set of tools for processing plaintext \
                     documentation into useful formats, such as HTML, XML, \
@@ -26,15 +26,24 @@
                     sha1    5c23bf94b46d5ad786dd6f278233d1f16c3047e8 \
                     rmd160  372abf9f47af11f0e63ae11f35f7db450097d960
 
-depends_lib         port:py27-roman
+python.versions     24 25 26 27
 
-# we want *-2.7.py not *.py-2.7
-python.link_binaries no
-post-destroot {
-    foreach f {rst2html rst2latex rst2man rst2odt rst2odt_prepstyles rst2pseudoxml rst2s5 rst2xml rstpep2html} {
-        ln -s ${python.prefix}/bin/${f}.py ${destroot}${prefix}/bin/${f}-2.7.py
+if {$subport != $name} {
+    depends_lib         port:py${python.version}-roman
+    
+    # we want e.g. *-2.7.py not *.py-2.7
+    python.link_binaries no
+    post-destroot {
+        foreach f {rst2html rst2latex rst2man rst2odt rst2odt_prepstyles rst2pseudoxml rst2s5 rst2xml rstpep2html rst2xetex} {
+            if {${python.version} >= 26} {
+                ln -s ${python.prefix}/bin/${f}.py ${destroot}${prefix}/bin/${f}-${python.branch}.py
+            } else {
+                move ${destroot}${prefix}/bin/${f}.py ${destroot}${prefix}/bin/${f}-${python.branch}.py
+            }
+        }
     }
+    livecheck.type  none
+} else {
+    livecheck.url   http://sourceforge.net/api/file/index/project-id/38414/rss
+    livecheck.regex {docutils/([0-9.]+)}    
 }
-
-livecheck.url       http://sourceforge.net/api/file/index/project-id/38414/rss
-livecheck.regex     {docutils/([0-9.]+)}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111003/1775ab74/attachment.html>


More information about the macports-changes mailing list