poetry 2.1.2
This commit is contained in:
parent
8273fc9806
commit
f75b24217f
37
poetry/alr.sh
Normal file
37
poetry/alr.sh
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name='poetry'
|
||||||
|
version='2.1.2'
|
||||||
|
release='1'
|
||||||
|
desc='Python dependency management and packaging made easy.'
|
||||||
|
homepage='https://python-poetry.org'
|
||||||
|
maintainer='Евгений Храмов <xpamych@yandex.ru>'
|
||||||
|
architectures=('all')
|
||||||
|
license=('MIT')
|
||||||
|
provides=('poetry')
|
||||||
|
conflicts=('poetry')
|
||||||
|
|
||||||
|
deps=("python3")
|
||||||
|
deps_arch=("python")
|
||||||
|
deps_alpine=("python3")
|
||||||
|
|
||||||
|
build_deps=("python3" "python3-pip")
|
||||||
|
build_deps_arch=("python" "python-pip")
|
||||||
|
build_deps_alpine=("python3" "py3-pip")
|
||||||
|
|
||||||
|
sources=("https://files.pythonhosted.org/packages/source/p/poetry/poetry-2.1.2.tar.gz")
|
||||||
|
checksums=('blake2b-256:7e96187b538742df11fe32beca5c146d9522b1fd9f42897f0772ff8dfc04972f')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$srcdir/poetry-${version}"
|
||||||
|
python3 -m build
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$srcdir/poetry-${version}"
|
||||||
|
pip install --root="${pkgdir}/" . --no-deps --disable-pip-version-check
|
||||||
|
}
|
||||||
|
|
||||||
|
files() {
|
||||||
|
echo ./usr/local/bin/poetry
|
||||||
|
printf '"%s" ' ./usr/local/lib/python3.*/site-packages/poetry/**/*
|
||||||
|
printf '"%s" ' ./usr/local/lib/python3.*/site-packages/poetry-${version}.dist-info/*
|
||||||
|
}
|
@ -1,93 +0,0 @@
|
|||||||
name='python3-poetry'
|
|
||||||
version='1.8.3'
|
|
||||||
release='4'
|
|
||||||
desc='Python dependency management and packaging made easy'
|
|
||||||
homepage='https://python-poetry.org'
|
|
||||||
maintainer="Евгений Храмов <xpamych@yandex.ru>"
|
|
||||||
architectures=('all')
|
|
||||||
license=('MIT')
|
|
||||||
provides=('poetry')
|
|
||||||
conflicts=('poetry')
|
|
||||||
|
|
||||||
deps=(
|
|
||||||
'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'
|
|
||||||
'python3-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=(
|
|
||||||
'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')
|
|
||||||
|
|
||||||
sources=("https://github.com/python-poetry/poetry/releases/download/${version}/poetry-${version}.tar.gz")
|
|
||||||
checksums=('SKIP')
|
|
||||||
|
|
||||||
prepare() {
|
|
||||||
cd "poetry-$version"
|
|
||||||
# Unpin crashtest which we have packaged at 0.4.0
|
|
||||||
# https://bugs.archlinux.org/task/75733
|
|
||||||
# Also unpin requests-toolbelt
|
|
||||||
# https://github.com/python-poetry/poetry/pull/7893
|
|
||||||
sed -i -e '/^crashtest/s/\^/>=/' -e '/^requests-toolbelt/s/,<0.11.0//' pyproject.toml
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
|
||||||
site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
|
||||||
cd "poetry-$version"
|
|
||||||
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/local/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 "poetry-$version"
|
|
||||||
export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH"
|
|
||||||
pytest -vv tests
|
|
||||||
}
|
|
||||||
|
|
||||||
package() {
|
|
||||||
cd "poetry-$version"
|
|
||||||
python -m installer -d "$pkgdir" dist/*.whl
|
|
||||||
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/"
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user