1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Contributor: David Runge <dvzrv@archlinux.org>
3 # Contributor: David JoaquĆn Shourabi Porcel <david@djsp.eu>
4 # Contributor: Sven-Hendrik Haase <svenstaro@gmail.com>
5 # Contributor: Eli Schwartz <eschwartz@archlinux.org>
11 pkgdesc='Python dependency management and packaging made easy'
13 url=https://python-poetry.org
43 "${_deps[@]/#/python-}"
46 python-deepdiff # not mentioned but required
47 python-psutil # for python-pytest-xdist
49 python-pip # not mentioned but required
52 python-pytest-randomly
56 'python-pip: to use pip with virtual environments'
59 _archive="$_pkgname-$pkgver"
60 source=("https://github.com/$pkgname/$_pkgname/archive/$pkgver/$_archive.tar.gz")
61 sha256sums=('8cdbad22dfd11ca9c7e37bcafe18ae931b80e0776adbe6df8d24091bd2b23eff')
65 # Unpin crashtest which we have packaged at 0.4.0
66 # https://bugs.archlinux.org/task/75733
67 # Also unpin requests-toolbelt
68 # https://github.com/python-poetry/poetry/pull/7893
69 sed -i -e '/^crashtest/s/\^/>=/' -e '/^requests-toolbelt/s/,<0.11.0//' pyproject.toml
73 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
77 # install to tmp dir for tests and generate completions
78 python -m installer --destdir=test_dir dist/*.whl
79 export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH"
80 export PATH="$PWD/test_dir/usr/bin:$PATH"
81 poetry completions bash > poetry.bash
82 poetry completions zsh > poetry.zsh
83 poetry completions fish > poetry.fish
87 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
90 export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH"
96 python -m installer -d "$pkgdir" dist/*.whl
97 install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
98 install -vDm 644 $_pkgname.bash "$pkgdir/usr/share/bash-completion/completions/$_pkgname"
99 install -vDm 644 $_pkgname.zsh "$pkgdir/usr/share/zsh/site-functions/_$_pkgname"
100 install -vDm 644 $_pkgname.fish -t "$pkgdir/usr/share/fish/vendor_completions.d/"