Ticket #59823: Portfile

File Portfile, 2.4 KB (added by reneeotten (Renee Otten), 5 years ago)
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-eyed3
7python.rootname     eyeD3
8version             0.8.11
9revision            0
10
11categories-append   audio
12platforms           darwin
13supported_archs     noarch
14license             GPL-3+
15maintainers         {elelay @elelay} openmaintainer
16
17description         Python audio data toolkit (ID3 and MP3)
18long_description    eyeD3 is a Python program/module for processing \
19                    (reading and writing) ID3 tags. Information about mp3 \
20                    files (i.e bit rate, sample frequency, play time, \
21                    etc.) is also available. The formats supported are ID3 \
22                    v1.0/v1.1 and v2.3/v2.4.
23
24homepage            https://eyed3.readthedocs.io
25master_sites        pypi:[string index ${python.rootname} 0]/${python.rootname}
26distname            ${python.rootname}-${version}
27
28checksums           rmd160  d1539b99b2b37e912faf6fa05e0ee294e0f6ea1c \
29                    sha256  0e4c9b9b42257deb9c38c112dbe44e1203dea686d454dc76adb72ded25ac878c \
30                    size    211813
31
32python.versions     27 37
33
34if {${name} ne ${subport}} {
35    depends_lib-append \
36                    port:py${python.version}-magic \
37                    port:py${python.version}-setuptools \
38                    port:py${python.version}-six
39
40    if {${python.version} eq 27} {
41        depends_lib-append \
42                    port:py${python.version}-pathlib2
43    }
44
45    # upstream is using pathlib, change that for pathlib2 which is already present in MacPorts
46    # only needed for PY27, for which support will be removed in the next release
47    post-patch {
48        reinplace "s|pathlib|pathlib2|g" ${worksrcpath}/src/eyed3/core.py
49        reinplace "s|pathlib|pathlib2|g" ${worksrcpath}/src/eyed3/plugins/art.py
50        reinplace "s|pathlib|pathlib2|g" ${worksrcpath}/src/eyed3/utils/__init__.py
51        reinplace "s|pathlib|pathlib2|g" ${worksrcpath}/requirements/requirements.yml
52    }
53
54    post-destroot {
55        set docdir ${prefix}/share/doc/${subport}
56        xinstall -d ${destroot}${docdir}
57        xinstall -m 0644 -W ${worksrcpath} AUTHORS.rst CONTRIBUTING.rst \
58           HISTORY.rst LICENSE README.rst ${destroot}${docdir}
59    }
60
61    livecheck.type  none
62}