[arch-commits] Commit in python-poetry-core/trunk (PKGBUILD)
Caleb Maclennan
alerque at gemini.archlinux.org
Tue Feb 22 19:46:26 UTC 2022
Date: Tuesday, February 22, 2022 @ 19:46:26
Author: alerque
Revision: 1136102
upgpkg: python-poetry-core 1.0.7-3; switch from dephell to pep517
Modified:
python-poetry-core/trunk/PKGBUILD
----------+
PKGBUILD | 42 +++++++++++++++++-------------------------
1 file changed, 17 insertions(+), 25 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-02-22 19:45:30 UTC (rev 1136101)
+++ PKGBUILD 2022-02-22 19:46:26 UTC (rev 1136102)
@@ -12,43 +12,35 @@
license=('MIT')
_deps=('jsonschema' 'lark-parser' 'packaging' 'tomlkit')
depends=("${_deps[@]/#/python-}")
-makedepends=('python-dephell')
-checkdepends=('git' 'python-pytest' 'python-pytest-mock' 'python-virtualenv')
+makedepends=(python-{build,installer})
+checkdepends=(git python-pytest python-pytest-mock python-virtualenv)
conflicts=('python-poetry<1.1.0')
-source=("${_pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
+_archive="$_pkgname-$pkgver"
+source=("$url/archive/$pkgver/$_archive.tar.gz")
sha256sums=('a4a99d2d0adb54d69acaa6d852bc9d41818b5a2d751aa23a9543e32bc4e6660d')
b2sums=('570f13e3c7298fd822a38b75c49c623bde4fa780b3787c3c9cfa3939bb68fee3eeaf6190013117a6e751cb6f87a15b343ba183529fcc07d30e37988097954d4a')
prepare() {
- cd ${_pkgname}-${pkgver}
-
- # remove vendored dependencies
- sed -i '/^__version__/!d' poetry/core/__init__.py
- rm -r poetry/core/_vendor
-
- # be a proper namespace, python3-only ;)
- rm poetry/__init__.py
-
- dephell deps convert --from pyproject.toml --to setup.py
+ cd "$_archive"
+ # remove vendored dependencies
+ sed -i '/^__version__/!d' poetry/core/__init__.py
+ rm -r poetry/core/_vendor
}
build() {
- cd ${_pkgname}-${pkgver}
-
- python setup.py build
+ cd "$_archive"
+ python -m build -wn
}
check() {
- cd ${_pkgname}-${pkgver}
-
- # only works inside git repositories
- pytest \
- -k 'not test_default_with_excluded_data and not test_default_src_with_excluded_data'
+ cd "$_archive"
+ # only works inside git repositories
+ pytest \
+ -k 'not test_default_with_excluded_data and not test_default_src_with_excluded_data'
}
package() {
- cd ${_pkgname}-${pkgver}
-
- python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
- install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+ cd "$_archive"
+ python -m installer -d "$pkgdir" dist/*.whl
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
}
More information about the arch-commits
mailing list