1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 117990 2014-03-18 15:07:09Z mmoll@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | |
---|
7 | name py-dateutil |
---|
8 | set my_name python-dateutil |
---|
9 | version 2.2 |
---|
10 | platforms darwin |
---|
11 | supported_archs noarch |
---|
12 | maintainers dh ram openmaintainer |
---|
13 | license BSD |
---|
14 | |
---|
15 | description powerful extensions to the standard python datetime module |
---|
16 | long_description ${description} |
---|
17 | |
---|
18 | homepage http://labix.org/python-dateutil |
---|
19 | master_sites https://pypi.python.org/packages/source/p/python-dateutil |
---|
20 | distname ${my_name}-${version} |
---|
21 | |
---|
22 | checksums md5 c1f654d0ff7e33999380a8ba9783fd5c \ |
---|
23 | sha1 fbafcd19ea0082b3ecb17695b4cb46070181699f \ |
---|
24 | rmd160 e72e546d762ffb3c2c952fcc77031352a9992b27 |
---|
25 | |
---|
26 | python.versions 24 25 26 27 31 32 33 34 |
---|
27 | |
---|
28 | if {${name} ne ${subport}} { |
---|
29 | depends_build port:py${python.version}-setuptools |
---|
30 | depends_run path:${python.pkgd}/pytz:py${python.version}-tz |
---|
31 | |
---|
32 | test.run yes |
---|
33 | test.cmd ${python.bin} test.py |
---|
34 | test.target |
---|
35 | test.env PYTHONPATH=${worksrcpath}/build/lib |
---|
36 | |
---|
37 | post-destroot { |
---|
38 | set docdir ${prefix}/share/doc/${subport} |
---|
39 | xinstall -d ${destroot}${docdir} |
---|
40 | xinstall -m 0644 -W ${worksrcpath} LICENSE README NEWS ${destroot}${docdir} |
---|
41 | } |
---|
42 | } |
---|
43 | |
---|
44 | if {${name} eq ${subport}} { |
---|
45 | livecheck.type regex |
---|
46 | livecheck.regex /${my_name}-(\\d+(?:\\.\\d+)*) |
---|
47 | } elseif {${subport} eq "py27-dateutil"} { |
---|
48 | livecheck.type regex |
---|
49 | livecheck.regex /${my_name}-(1.(\\d+)*) |
---|
50 | } else { |
---|
51 | livecheck.type none |
---|
52 | } |
---|
53 | |
---|
54 | subport py32-dateutil { |
---|
55 | pre-activate { |
---|
56 | set regref [registry_open $subport $version $revision $portvariants ""] |
---|
57 | foreach f [registry_prop_retr $regref imagefiles] { |
---|
58 | if {[file extension $f] == ".pyc" && [file exists $f] && [registry_file_registered $f] == "0"} { |
---|
59 | file delete -force $f |
---|
60 | } |
---|
61 | } |
---|
62 | } |
---|
63 | } |
---|