1 # Maintainer: Morten Linderud <foxboron@archlinux.org>
2 # Maintainer: Andrew Crerar <crerar@archlinux.org>
3 # Contributor: Maikel Wever <maikelwever@gmail.com>
8 pkgdesc="Sacred Marriage of Pipfile, Pip, & Virtualenv."
9 url="https://pipenv.pypa.io"
15 'python-virtualenv-clone'
17 makedepends=('python-build'
21 checkdepends=('python-pytest'
23 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/pypa/pipenv/archive/v${pkgver}.tar.gz")
24 b2sums=('31432b80f82b041969e75d0ec0a28ca90068395be25dac94a7f34526f0b638adfae59e9396b147fa61592ee78af2d9cfb4a1b65dedea9bbb299b2624a6d6e9a1')
28 python -m build --wheel --no-isolation
33 pytest tests/unit --ignore tests/unit/test_utils_windows_executable.py
37 local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
40 python -m installer --destdir="$pkgdir" dist/*.whl
42 install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
44 find . -name \*LICENSE\* -exec install -Dm 644 \{\} "${pkgdir}/usr/share/licenses/${pkgname}/"\{\} \;
47 PYTHONPATH="${pkgdir}/${_site_packages}" _PIPENV_COMPLETE=bash_source "${pkgdir}"/usr/bin/pipenv | install -Dm644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/pipenv"
48 PYTHONPATH="${pkgdir}/${_site_packages}" _PIPENV_COMPLETE=zsh_source "${pkgdir}"/usr/bin/pipenv | install -Dm644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_pipenv"
49 PYTHONPATH="${pkgdir}/${_site_packages}" _PIPENV_COMPLETE=fish_source "${pkgdir}"/usr/bin/pipenv | install -Dm644 /dev/stdin "${pkgdir}/usr/share/fish/vendor_completions.d/pipenv.fish"
51 # Remove vendored cacert.pem
52 # Taken from python-certifi
53 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
54 rm "$pkgdir"/$site_packages/pipenv/patched/pip/_vendor/certifi/cacert.pem
55 ln -sf /etc/ssl/certs/ca-certificates.crt "$pkgdir"/$site_packages/pipenv/patched/pip/_vendor/certifi/cacert.pem