Date: Tuesday, March 21, 2023 @ 11:09:25
  Author: alerque
Revision: 1424719

archrelease: copy trunk to community-testing-any

Added:
  python-poetry/repos/community-testing-any/
  python-poetry/repos/community-testing-any/PKGBUILD
    (from rev 1424718, python-poetry/trunk/PKGBUILD)
  python-poetry/repos/community-testing-any/poetry-completions-generator
    (from rev 1424718, python-poetry/trunk/poetry-completions-generator)

------------------------------+
 PKGBUILD                     |   88 +++++++++++++++++++++++++++++++++++++++++
 poetry-completions-generator |   15 ++++++
 2 files changed, 103 insertions(+)

Copied: python-poetry/repos/community-testing-any/PKGBUILD (from rev 1424718, 
python-poetry/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD                              (rev 0)
+++ community-testing-any/PKGBUILD      2023-03-21 11:09:25 UTC (rev 1424719)
@@ -0,0 +1,88 @@
+# Maintainer: Caleb Maclennan <[email protected]>
+# Contributor: David JoaquĆ­n Shourabi Porcel <[email protected]>
+# Contributor: Sven-Hendrik Haase <[email protected]>
+# Contributor: Eli Schwartz <[email protected]>
+
+BUILDENV+=(!check)
+
+_pkgname=poetry
+pkgname=python-poetry
+pkgver=1.4.1
+pkgrel=1
+pkgdesc='Python dependency management and packaging made easy'
+arch=(any)
+url=https://python-poetry.org
+license=(MIT)
+_deps=(build
+       cachecontrol
+       cachy
+       cleo
+       crashtest
+       dulwich
+       html5lib
+       installer
+       jsonschema
+       keyring
+       lockfile
+       packaging
+       pexpect
+       pkginfo
+       platformdirs
+       poetry-core
+       poetry-plugin-export
+       requests
+       requests-toolbelt
+       shellingham
+       tomli
+       tomlkit
+       urllib3
+       virtualenv)
+depends=("${_deps[@]/#/python-}")
+makedepends=(python)
+checkdepends=(git
+              python-httpretty
+              python-pytest
+              python-pytest-mock)
+provides=(poetry)
+_archive="$_pkgname-$pkgver"
+source=("https://github.com/$pkgname/$_pkgname/archive/$pkgver/$_archive.tar.gz";
+        poetry-completions-generator)
+sha256sums=('506965564014206e2f562aab95eb33f20a6b71c445eaeb6eb6f5c99befaa27f0'
+            'e44c71a3b804b5c2bf07573ed465aee275a5844f10e37ee63c7395c9213a2b6d')
+
+prepare() {
+       cd "$_archive"
+       install -m0755 -t ./ ../poetry-completions-generator
+       # Unpin crashtest which we have packaged at 0.4.0
+       # https://bugs.archlinux.org/task/75733
+       sed -i -e '/^crashtest/s/\^/>=/' pyproject.toml
+}
+
+build() {
+       cd "$_archive"
+       python -m build -wn
+}
+
+check() {
+       cd "$_archive/src"
+       export PYTHONPATH="$PWD"
+       pytest
+}
+
+package() {
+       cd "$_archive"
+       python -m installer -d "$pkgdir" dist/*.whl
+       install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
+       # install completions, which for some crazy reason hardcode the filename
+       # used to invoke which is __main__.py if we use python -m poetry, and 
also
+       # adds the full directory path???
+       set -o pipefail
+       ./poetry-completions-generator completions bash |
+               sed "#$srcdir#d" |
+               install -Dm644 /dev/stdin 
"$pkgdir/usr/share/bash-completion/completions/poetry"
+       ./poetry-completions-generator completions zsh |
+               sed "#$srcdir#d" |
+               install -Dm644 /dev/stdin 
"$pkgdir/usr/share/zsh/site-functions/_poetry"
+       ./poetry-completions-generator completions fish |
+               install -Dm644 /dev/stdin 
"$pkgdir/usr/share/fish/vendor_completions.d/poetry.fish"
+}

Copied: python-poetry/repos/community-testing-any/poetry-completions-generator 
(from rev 1424718, python-poetry/trunk/poetry-completions-generator)
===================================================================
--- community-testing-any/poetry-completions-generator                          
(rev 0)
+++ community-testing-any/poetry-completions-generator  2023-03-21 11:09:25 UTC 
(rev 1424719)
@@ -0,0 +1,15 @@
+#!/usr/bin/python3
+
+# This is a dummy script that fakes its own sys.argv[0] to make the completions
+# subcommand do the correct thing when run from the build directory. cleo's
+# completion generator uses this to generate completions for sys.argv[0] as 
well
+# as (???) os.path.join(os.getcwd(), sys.argv[0]) for mysterious reasons.
+#
+# We don't want to complete 'poetry/__main__.py'....
+
+import sys
+from poetry.console.application import main
+
+sys.argv = ['poetry', 'completions', sys.argv.pop()]
+
+main()

Reply via email to