From 06e5b8c828cbb44a48c33895a9189c48366e0993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=A5=D1=80?= =?UTF-8?q?=D0=B0=D0=BC=D0=BE=D0=B2?= Date: Sat, 28 Sep 2024 14:05:45 +0300 Subject: [PATCH] python-poetry --- python-poetry/alr.sh | 136 +++++++++++++++++++++++++++---------------- 1 file changed, 87 insertions(+), 49 deletions(-) diff --git a/python-poetry/alr.sh b/python-poetry/alr.sh index 09f21f3..279a975 100644 --- a/python-poetry/alr.sh +++ b/python-poetry/alr.sh @@ -1,5 +1,3 @@ -_pkgname="poetry" - name='python-poetry' version='1.8.3' release='1' @@ -11,50 +9,90 @@ license=('MIT') provides=('poetry') conflicts=('poetry') -_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) -deps=(python - "${_deps[@]/#/python-}") -build_deps=(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) +deps=( + 'python-build' + 'python-cachecontrol' + 'python-cachy' + 'python-cleo' + 'python-crashtest' + 'python-dulwich' + 'python-filelock' + 'python-html5lib' + 'python-installer' + 'python-jsonschema' + 'python-keyring' + 'python-lockfile' + 'python-packaging' + 'python-pexpect' + 'python-pkginfo' + 'pythonn-platformdirs' + 'python-poetry-core' + 'python-poetry-plugin-export' + 'python-pyproject-hooks' + 'python-requests' + 'python-requests-toolbelt' + 'python-shellingham' + 'python-tomlkit' + 'python-trove-classifiers' + 'python-urllib3' + 'python-virtualenv' +) +deps_redos=( + 'python3-build' + 'python3-cachecontrol' + 'python3-cachy' + 'python3-cleo' + 'python3-crashtest' + 'python3-dulwich' + 'python3-filelock' + 'python3-html5lib' + 'python3-installer' + 'python3-jsonschema' + 'python3-keyring' + 'python3-lockfile' + 'python3-packaging' + 'python3-pexpect' + 'python3-pkginfo' + 'pythonn3-platformdirs' + 'python3-poetry-core' + 'python3-poetry-plugin-export' + 'python3-pyproject-hooks' + 'python3-requests' + 'python3-requests-toolbelt' + 'python3-shellingham' + 'python3-tomlkit' + 'python3-trove-classifiers' + 'python3-urllib3' + 'python3-virtualenv' +) +build_deps=( + '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' +) +build_deps_redos=( + 'python3-deepdiff' # not mentioned but required + 'python-psutil' # for python-pytest-xdist + 'python3-httpretty' + 'python-pip' # not mentioned but required + 'python-pytest' + 'python-pytest-mock' + 'python3-pytest-randomly' + 'python-pytest-xdist' +) opt_deps=('python-pip: to use pip with virtual environments') +opt_deps_redos=('python3-pip: to use pip with virtual environments') -_archive="$_pkgname-$pkgver" -source=("https://github.com/$pkgname/$_pkgname/archive/$pkgver/$_archive.tar.gz") -sha256sums=('4da8d1b19cfb50536c6b54e984b88cec3bc1203f9749d5f4958db5cbb0c7b7bc') +sources=("https://github.com/$name/poetry/releases/download/${version}/poetry-${version}.tar.gz") +checksums=('SKIP') prepare() { - cd "$_archive" + cd "poetry-$version" # Unpin crashtest which we have packaged at 0.4.0 # https://bugs.archlinux.org/task/75733 # Also unpin requests-toolbelt @@ -64,7 +102,7 @@ prepare() { build() { local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") - cd "$_archive" + cd "poetry-$version" python -m build -wn # install to tmp dir for tests and generate completions python -m installer --destdir=test_dir dist/*.whl @@ -77,16 +115,16 @@ build() { check() { local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") - cd "$_archive" + cd "poetry-$version" export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH" pytest -vv tests } package() { - cd "$_archive" + cd "poetry-$version" 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/" + install-license ./LICENSE ./poetry/LICENSE + install -vDm 644 poetry.bash "$pkgdir/usr/share/bash-completion/completions/poetry" + install -vDm 644 poetry.zsh "$pkgdir/usr/share/zsh/site-functions/_poetry" + install -vDm 644 poetry.fish -t "$pkgdir/usr/share/fish/vendor_completions.d/" }