1 # Maintainer: David Runge <dvzrv@archlinux.org>
7 pkgdesc="A modern Python package manager with PEP 582 support"
9 url="https://github.com/pdm-project/pdm"
19 python-lockfile # required optdepends of python-cachecontrol
23 python-pyproject-hooks
24 python-requests # required by python-requests-toolbelt
25 python-requests-toolbelt
40 python-pytest-httpserver
44 'python-keyring: for storing credentials'
45 'python-pytest-mock: for pytest plugin'
46 'python-setuptools: for parsing setup.py files'
48 source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
49 sha512sums=('91d0967f407f1f1e2d23e9b43e268d105ed14ec7772eaa433bf20912fa710478ee7a33d01691d795b875cf6385d61bb3d431d176d53c16d3018670e28794b9c5')
50 b2sums=('65a3f8e8badf4bd6da2d801ea38f1e85c1e6ccf204a8c4fb1aa7be31c9093ae8ac93b882a511a00814b4838a479fd7b0cfdcea452198388abfec7cdc00b6b610')
54 python -m build --wheel --no-isolation
58 local pytest_options=(
60 # https://github.com/pdm-project/pdm/issues/1831
61 --deselect tests/cli/test_others.py::test_build_distributions
62 # we don't want to run tests that require the internet
63 --deselect tests/test_project.py::test_access_index_with_auth
65 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
68 # install to temporary location, as importlib is used
69 python -m installer --destdir=test_dir dist/*.whl
70 export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH"
71 pytest "${pytest_options[@]}"
76 python -m installer --destdir="$pkgdir" dist/*.whl
77 install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
78 install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
80 install -vd "$pkgdir/usr/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
81 "$pkgdir"/usr/bin/pdm completion bash > "$pkgdir/usr/share/bash-completion/completions/$_name"
82 "$pkgdir"/usr/bin/pdm completion fish > "$pkgdir/usr/share/fish/vendor_completions.d/$_name.fish"
83 "$pkgdir"/usr/bin/pdm completion zsh > "$pkgdir/usr/share/zsh/site-functions/_$_name"