[82443] trunk/dports/python

jmr at macports.org jmr at macports.org
Sat Aug 13 16:26:30 PDT 2011


Revision: 82443
          http://trac.macports.org/changeset/82443
Author:   jmr at macports.org
Date:     2011-08-13 16:26:28 -0700 (Sat, 13 Aug 2011)
Log Message:
-----------
py*-nose: unify (#30676)

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

Removed Paths:
-------------
    trunk/dports/python/py25-nose/
    trunk/dports/python/py26-nose/
    trunk/dports/python/py27-nose/
    trunk/dports/python/py31-nose/
    trunk/dports/python/py32-nose/

Modified: trunk/dports/python/py-nose/Portfile
===================================================================
--- trunk/dports/python/py-nose/Portfile	2011-08-13 23:11:46 UTC (rev 82442)
+++ trunk/dports/python/py-nose/Portfile	2011-08-13 23:26:28 UTC (rev 82443)
@@ -2,34 +2,72 @@
 # $Id$
 
 PortSystem			1.0
-PortGroup			python24 1.0
+PortGroup           python 1.0
 
-name				py-nose
+set my_name         nose
+name				py-${my_name}
 version				1.0.0
-categories-append		www
+categories-append	www
 license				LGPL-2+
-maintainers			openmaintainer akitada
+maintainers			akitada mcalhoun openmaintainer
 description			A Python unittest extension.
-long_description		A unittest extension offering automatic test \
-				suite discovery, simplified test authoring, \
-				and output capture. Nose provides an alternate \
-				test discovery and running process for \
-				unittest, one that is intended to mimic the \
-				behavior of py.test as much as is reasonably \
-				possible without resorting to magic.
+long_description \
+    A unittest extension offering automatic test \
+    suite discovery, simplified test authoring, \
+    and output capture. Nose provides an alternate \
+    test discovery and running process for \
+    unittest, one that is intended to mimic the \
+    behavior of py.test as much as is reasonably \
+    possible without resorting to magic.
 
 platforms			darwin
-supported_archs			noarch
+supported_archs		noarch
 
-homepage			http://somethingaboutorange.com/mrl/projects/nose/
-master_sites			${homepage}
-distname			nose-${version}
+homepage			http://somethingaboutorange.com/mrl/projects/${my_name}
+master_sites		http://pypi.python.org/packages/source/n/${my_name}
+distname			${my_name}-${version}
 
-depends_lib			port:py-setuptools
+checksums           md5     47a4784c817afa6ef11a505b574584ed \
+                    sha1    186d223d0d74e94093bc0c42223d2ad92c090eed
 
-checksums           md5     9542d4c66e04880d8144990de76e0b88 \
-                    sha1    30015cbcb201975dbb8613acb651984255458741 \
+python.versions     24 25 26 27 31 32
 
-patch {
-	reinplace "s|man/man|share/man/man|" ${worksrcpath}/setup.py
+if {$subport != $name} {
+    if {${python.version} == "24"} {
+        depends_lib		port:py-setuptools
+    } else {
+        depends_lib		port:py${python.version}-distribute
+    }
+
+    post-patch {
+        reinplace "s|man/man|share/man/man|" ${worksrcpath}/setup.py
+    
+        # One of the tests fails if this directory does not exist
+        file mkdir ${worksrcpath}/functional_tests/support/empty
+    }
+
+    post-destroot {
+        if {${python.version} == "24" || ${python.version} == "25"} {
+            move ${destroot}${prefix}/share/man/man1/nosetests.1 ${destroot}${prefix}/share/man/man1/nosetests${python.branch}.1
+            delete ${destroot}${prefix}/bin/nosetests
+        } else {
+            ln -s ${python.prefix}/share/man/man1/nosetests.1 ${destroot}${prefix}/share/man/man1/nosetests${python.branch}.1
+        }
+
+        xinstall -m 644 -W ${worksrcpath} \
+            AUTHORS CHANGELOG NEWS README.txt \
+            ${destroot}${prefix}/share/doc/${subport}
+    
+        file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${subport}/html
+    
+        file delete ${destroot}${prefix}/share/doc/${subport}/examples
+        file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${subport}
+    }
+
+    test.run  yes
+    test.cmd  ${python.bin} setup.py test
 }
+
+livecheck.type   regex
+livecheck.url    ${master_sites}
+livecheck.regex     "${my_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110813/16d047c5/attachment.html>


More information about the macports-changes mailing list