source: trunk/dports/python/py-openssl/Portfile

Last change on this file was 150225, checked in by petr@…, 17 months ago

py-openssl: update to version 16.0.0, retire py26 subport, related to #51825.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
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# $Id: Portfile 150225 2016-07-13 09:19:51Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup python    1.0
6
7set _name           pyOpenSSL
8set _n              [string index ${_name} 0]
9
10name                py-openssl
11version             16.0.0
12
13categories-append   devel security
14license             Apache-2
15maintainers         mcalhoun openmaintainer
16platforms           darwin freebsd
17
18description         python wrapper around the OpenSSL library
19long_description    \
20    This python module is a rather thin wrapper around (a subset of) the \
21    OpenSSL library. With thin wrapper a lot of the object methods do \
22    nothing more than calling a corresponding function in the OpenSSL library.
23
24homepage            https://github.com/pyca/pyopenssl
25distname            ${_name}-${version}
26master_sites        pypi:${_n}/${_name}/
27
28checksums           md5     9587d813dcf656e9f2760e41a3682dc3 \
29                    rmd160  5743ac77e6accd99ce645adbfff559ba379f94b7 \
30                    sha256  363d10ee43d062285facf4e465f4f5163f9f702f9134f0a5896f134cbb92d17d
31
32python.versions     27 34 35
33
34if {${name} ne ${subport}} {
35    depends_build-append    port:py${python.version}-setuptools
36
37    depends_lib-append      path:lib/libssl.dylib:openssl \
38                            port:py${python.version}-cryptography \
39                            port:py${python.version}-six
40
41    post-patch {
42        reinplace "s|#!/usr/bin/env python|#!${python.bin}|" ${worksrcpath}/examples/proxy.py
43    }
44
45    post-destroot {
46        xinstall -m 644 -W ${worksrcpath} \
47            CHANGELOG.rst \
48            CODE_OF_CONDUCT.rst \
49            CONTRIBUTING.rst \
50            INSTALL.rst \
51            README.rst \
52            LICENSE \
53                ${destroot}${prefix}/share/doc/${subport}
54
55        file delete ${destroot}${prefix}/share/doc/${subport}/examples
56        copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${subport}
57    }
58
59    variant doc description {build html documentation} {
60        depends_build-append    port:py${python.version}-sphinx
61        #depends_build-append port:latex2html
62
63        post-patch {
64            # Ensure that the correct sphinx-build is used.
65            reinplace "s|sphinx-build|sphinx-build-${python.branch}|" ${worksrcpath}/doc/Makefile
66        }
67
68        post-build {
69            system "cd ${worksrcpath}/doc && /usr/bin/make html"
70        }
71
72        post-destroot {
73            copy ${worksrcpath}/doc/_build/html ${destroot}${prefix}/share/doc/${subport}
74        }
75    }
76
77    livecheck.type      none
78} else {
79    livecheck.type      regex
80    livecheck.url       https://pypi.python.org/pypi/${_name}/json
81    livecheck.regex     "\"${_name}-(\[.\\d\]+)\\${extract.suffix}\""
82}
Note: See TracBrowser for help on using the repository browser.