Ticket #62317: Portfile

File Portfile, 2.8 KB (added by n2ee, 3 years ago)

Non-working example of trying to set use_zip = false.

Line 
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
3PortSystem         1.0
4PortGroup          python 1.0
5
6name               py-dnspython
7version            2.1.0
8categories-append  net
9license            ISC
10platforms          darwin
11supported_archs    noarch
12maintainers        nomaintainer
13
14description        DNS toolkit for Python
15long_description \
16  dnspython is a DNS toolkit for Python. It supports almost all \
17  record types. It can be used for queries, zone transfers, and \
18  dynamic updates. It supports TSIG authenticated messages and EDNS0.
19
20homepage           http://www.dnspython.org/
21distname           dnspython-${version}
22master_sites       pypi:[string index ${python.rootname} 0]/${python.rootname}/
23
24python.versions    27 36 37 38 39
25
26use_zip            true
27
28checksums          rmd160  788eefa23e3ec734bfd02910ecab2cff534bb117 \
29                   sha256  e4a87f0b573201a0f3727fa18a516b055fd1107e0e5477cded4a2de497df1dd4 \
30                   size    389021
31
32if {${name} ne ${subport}} {
33  depends_build-append port:py${python.version}-setuptools
34
35  depends_lib-append port:py${python.version}-cryptography \
36                     port:py${python.version}-idna \
37                     port:py${python.version}-requests \
38                     port:py${python.version}-requests-toolbelt \
39                     port:py${python.version}-sniffio \
40                     port:py${python.version}-trio
41
42    if {${python.version} eq 27} {
43        use_zip             false
44        version             1.16.0
45        revision            0
46        # Below distname is required for this to work
47        distname            dnspython-${version}
48
49        checksums           rmd160  c3662f85998d51b437a3eaa0f5a04c3b0d61fd69 \
50                            sha256  4bf5c5c12a4478ee7860ab176659cf64c4899ee76752d826b082f8af723c5cf9 \
51                            size    150524
52
53        depends_lib-delete  port:py${python.version}-sniffio \
54                            port:py${python.version}-trio
55    } else {
56        depends_test-append port:py${python.version}-pytest
57
58        test.run        yes
59        test.dir        ${build.dir}/tests
60        test.cmd        python${python.branch}
61        test.target     utest.py
62        test.env        PYTHONPATH=${worksrcpath}/build/lib
63    }
64}
65
66post-destroot {
67  if {${name} ne ${subport}} {
68  xinstall -d -m 755 ${destroot}${prefix}/share/doc/${subport}/examples
69  xinstall -m 644 -W ${worksrcpath} LICENSE README.md \
70    ${destroot}${prefix}/share/doc/${subport}
71  xinstall -m 644 -W ${worksrcpath}/examples ddns.py e164.py \
72    mx.py name.py query_specific.py receive_notify.py reverse.py \
73    reverse_name.py xfr.py zonediff.py \
74    ${destroot}${prefix}/share/doc/${subport}/examples
75  }
76}