[146959] trunk/dports/python/py-dateutil/Portfile

petr at macports.org petr at macports.org
Tue Mar 22 07:33:16 PDT 2016


Revision: 146959
          https://trac.macports.org/changeset/146959
Author:   petr at macports.org
Date:     2016-03-22 07:33:16 -0700 (Tue, 22 Mar 2016)
Log Message:
-----------
py-dateutil: fix livecheck, minor changes, use pypi pattern

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

Modified: trunk/dports/python/py-dateutil/Portfile
===================================================================
--- trunk/dports/python/py-dateutil/Portfile	2016-03-22 14:23:29 UTC (rev 146958)
+++ trunk/dports/python/py-dateutil/Portfile	2016-03-22 14:33:16 UTC (rev 146959)
@@ -4,8 +4,10 @@
 PortSystem          1.0
 PortGroup           python 1.0
 
+set _name           python-dateutil
+set _n              [string index ${_name} 0]
+
 name                py-dateutil
-set my_name         python-dateutil
 version             2.4.2
 revision            0
 platforms           darwin
@@ -16,9 +18,9 @@
 description         powerful extensions to the standard python datetime module
 long_description    ${description}
 
-homepage            https://pypi.python.org/pypi/python-dateutil
-master_sites        https://pypi.python.org/packages/source/p/python-dateutil
-distname            ${my_name}-${version}
+homepage            https://pypi.python.org/pypi/${_name}
+master_sites        https://pypi.python.org/packages/source/${_n}/${_name}/
+distname            ${_name}-${version}
 
 checksums           rmd160  07ebff23086b9bf046660a4b19e5768c5e93c8c7 \
                     sha256  3e95445c1db500a344079a47b171c45ef18f57d188dffdb0e4165c71bea8eb3d
@@ -31,18 +33,21 @@
     depends_lib-append  port:py${python.version}-six
 
     test.run        yes
-    test.cmd        ${python.bin} setup.py test
-    test.target
+    test.cmd        ${python.bin} setup.py
+    test.target     test
     test.env        PYTHONPATH=${worksrcpath}/build/lib
 
     post-destroot {
         set docdir ${prefix}/share/doc/${subport}
         xinstall -d ${destroot}${docdir}
-        xinstall -m 0644 -W ${worksrcpath} LICENSE README.rst NEWS ${destroot}${docdir}
+        xinstall -m 0644 -W ${worksrcpath} \
+            LICENSE README.rst NEWS \
+                ${destroot}${docdir}
     }
 
     livecheck.type  none
 } else {
     livecheck.type  regex
-    livecheck.regex /${my_name}-(\\d+(?:\\.\\d+)*)
+    livecheck.url   https://pypi.python.org/pypi/${_name}/json
+    livecheck.regex "\"${_name}-(\[.\\d\]+)\\${extract.suffix}\""
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160322/d6344da4/attachment.html>


More information about the macports-changes mailing list