1 # Maintainer: Thore Bödecker <foxxx0@archlinux.org>
2 # Contributor: Laurent Soest <laurent.soest(at)gmail.com>
4 pkgname='python-portend'
5 _pkgbase="${pkgname//python-/}"
8 pkgdesc="Use portend to monitor TCP ports for bound or unbound states."
10 url="https://github.com/jaraco/portend"
12 depends=('python' 'python-tempora')
13 makedepends=('python-setuptools' 'python-setuptools-scm' 'python-tox'
15 checkdepends=('python-pytest')
16 source=("https://files.pythonhosted.org/packages/source/${_pkgbase:0:1}/${_pkgbase}/${_pkgbase}-${pkgver}.tar.gz"
18 sha512sums=('017dff68ea85f48d19398f71fbd8189329ca9c27c05d8599dd5e53632eb5ddc6dea322e94c924a0653f25f042a3c8ee1cda5f8450b02f3406a72036d54cd1aaf'
19 '1106afed483b7258e4ae89c5d9459c3834412b31aac90169725ed62d2ab44f61f6f79e894d4c9e4d8bd99e14530ab778df2187784f0b25eaab86d312fad68944')
22 cd "${srcdir}/${_pkgbase}-${pkgver}"
23 # remove linting/style tests, not relevant for downstream packaging
24 for pointless_flag in \
31 sed -i "s/${pointless_flag}//g" pytest.ini
36 # setuptools wont find version from git tag
37 export SETUPTOOLS_SCM_PRETEND_VERSION="${pkgver}"
38 cd "${srcdir}/${_pkgbase}-${pkgver}"
39 python ./setup.py build
43 cd "${srcdir}/${_pkgbase}-${pkgver}"
45 py.test -vvv -s -ra --showlocals --noconftest .
49 cd "${srcdir}/${_pkgbase}-${pkgver}"
50 python ./setup.py install --root="${pkgdir}" --optimize=1
52 # the author has promised to include a LICENSE file in future releases:
53 # https://github.com/jaraco/skeleton/issues/1
54 # for now the LICENSE file has been taken from:
55 # https://github.com/jaraco/skeleton/blob/skeleton/LICENSE
56 install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"