Date: Thursday, April 13, 2023 @ 23:46:34
  Author: dvzrv
Revision: 1445965

archrelease: copy trunk to community-staging-any

Added:
  python-poetry/repos/community-staging-any/
  python-poetry/repos/community-staging-any/PKGBUILD
    (from rev 1445964, python-poetry/trunk/PKGBUILD)

----------+
 PKGBUILD |   99 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 99 insertions(+)

Copied: python-poetry/repos/community-staging-any/PKGBUILD (from rev 1445964, 
python-poetry/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-13 23:46:34 UTC (rev 1445965)
@@ -0,0 +1,99 @@
+# Maintainer: Caleb Maclennan <[email protected]>
+# Contributor: David Runge <[email protected]>
+# Contributor: David JoaquĆ­n Shourabi Porcel <[email protected]>
+# Contributor: Sven-Hendrik Haase <[email protected]>
+# Contributor: Eli Schwartz <[email protected]>
+
+_pkgname=poetry
+pkgname=python-poetry
+pkgver=1.4.2
+pkgrel=2
+pkgdesc='Python dependency management and packaging made easy'
+arch=(any)
+url=https://python-poetry.org
+license=(MIT)
+_deps=(build
+       cachecontrol
+       cachy
+       cleo
+       crashtest
+       dulwich
+       filelock
+       html5lib
+       installer
+       jsonschema
+       keyring
+       lockfile
+       packaging
+       pexpect
+       pkginfo
+       platformdirs
+       poetry-core
+       poetry-plugin-export
+       pyproject-hooks
+       requests
+       requests-toolbelt
+       shellingham
+       tomlkit
+       trove-classifiers
+       urllib3
+       virtualenv)
+depends=(
+  python
+  "${_deps[@]/#/python-}"
+)
+checkdepends=(
+  python-deepdiff  # not mentioned but required
+  python-psutil  # for python-pytest-xdist
+  python-httpretty
+  python-pip  # not mentioned but required
+  python-pytest
+  python-pytest-mock
+  python-pytest-randomly
+  python-pytest-xdist
+)
+optdepends=(
+  'python-pip: to use pip with virtual environments'
+)
+provides=(poetry)
+_archive="$_pkgname-$pkgver"
+source=("https://github.com/$pkgname/$_pkgname/archive/$pkgver/$_archive.tar.gz";)
+sha256sums=('8cdbad22dfd11ca9c7e37bcafe18ae931b80e0776adbe6df8d24091bd2b23eff')
+
+prepare() {
+  cd "$_archive"
+  # Unpin crashtest which we have packaged at 0.4.0
+  # https://bugs.archlinux.org/task/75733
+  sed -i -e '/^crashtest/s/\^/>=/' pyproject.toml
+}
+
+build() {
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+  cd "$_archive"
+  python -m build -wn
+
+  # install to tmp dir for tests and generate completions
+  python -m installer --destdir=test_dir dist/*.whl
+  export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH"
+  export PATH="$PWD/test_dir/usr/bin:$PATH"
+  poetry completions bash > poetry.bash
+  poetry completions zsh > poetry.zsh
+  poetry completions fish > poetry.fish
+}
+
+check() {
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+
+  cd "$_archive"
+  export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH"
+  pytest -vv tests
+}
+
+package() {
+  cd "$_archive"
+  python -m installer -d "$pkgdir" dist/*.whl
+  install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
+  install -vDm 644 $_pkgname.bash 
"$pkgdir/usr/share/bash-completion/completions/$_pkgname"
+  install -vDm 644 $_pkgname.zsh 
"$pkgdir/usr/share/zsh/site-functions/_$_pkgname"
+  install -vDm 644 $_pkgname.fish -t 
"$pkgdir/usr/share/fish/vendor_completions.d/"
+}

Reply via email to