Date: Monday, January 13, 2020 @ 00:38:57 Author: dvzrv Revision: 552268
Adding python-pytest-vcr as checkdepends for python-mailmanclient. Added: python-pytest-vcr/ python-pytest-vcr/repos/ python-pytest-vcr/trunk/ python-pytest-vcr/trunk/PKGBUILD ----------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) Added: python-pytest-vcr/trunk/PKGBUILD =================================================================== --- python-pytest-vcr/trunk/PKGBUILD (rev 0) +++ python-pytest-vcr/trunk/PKGBUILD 2020-01-13 00:38:57 UTC (rev 552268) @@ -0,0 +1,48 @@ +# Maintainer: David Runge <[email protected]> + +_name=pytest-vcr +pkgname=python-pytest-vcr +pkgver=1.0.2 +pkgrel=2 +pkgdesc="Py.test plugin for managing VCR.py cassettes" +arch=('any') +url="https://github.com/ktosiek/pytest-vcr" +license=('MIT') +depends=('python-pytest' 'python-vcrpy') +makedepends=('python-setuptools') +checkdepends=('python-coverage' 'python-pytest') +# the pypi sdist for 1.0.2 doesn't have the tests (yet) +# https://github.com/ktosiek/pytest-vcr/issues/26 +# source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz") +source=("${_name}-${pkgver}.tar.gz::https://github.com/ktosiek/${_name}/archive/${pkgver}.tar.gz") +sha512sums=('29dceb51092d73f2190b89e82e88b59506591a35cfe4f141bb877c05420d67a8ab2f21f63c2630972c35697d01b242891917d1be19b14fdfa810c1799f8542c2') + +prepare() { + mv -v "${_name}-${pkgver}" "$pkgname-$pkgver" + cd "$pkgname-$pkgver" + sed -e '/pytest.config/d' -i tests/test_vcr.py +} + +build() { + cd "$pkgname-$pkgver" + python setup.py build +} + +check() { + cd "$pkgname-$pkgver" + local python_stdlib_basepath="$(python -c "from sysconfig import get_path; print(get_path('stdlib'))")" + # Hack entry points by installing it + python setup.py install --root="${PWD}/tmp_install" --optimize=1 + export PYTHONPATH="${PWD}/tmp_install/${python_stdlib_basepath/\//}/site-packages:${PYTHONPATH}:${PWD}/tests" + pytest -v +} + +package() { + cd "$pkgname-$pkgver" + python setup.py install --skip-build \ + --optimize=1 \ + --prefix=/usr \ + --root="${pkgdir}" + install -vDm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}" + install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" +}
