[arch-commits] Commit in python-flit/trunk (PKGBUILD)
Maxime Gauduin
alucryd at gemini.archlinux.org
Wed Nov 24 13:06:53 UTC 2021
Date: Wednesday, November 24, 2021 @ 13:06:53
Author: alucryd
Revision: 1054674
upgpkg: python-flit 3.5.1-1
Modified:
python-flit/trunk/PKGBUILD
----------+
PKGBUILD | 44 ++++++++++++--------------------------------
1 file changed, 12 insertions(+), 32 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-11-24 12:53:05 UTC (rev 1054673)
+++ PKGBUILD 2021-11-24 13:06:53 UTC (rev 1054674)
@@ -4,47 +4,29 @@
_pkgname=flit
pkgbase=python-$_pkgname
pkgname=($pkgbase{,-core})
-pkgver=3.2.0
-pkgrel=4
+pkgver=3.5.1
+pkgrel=1
pkgdesc='Simplified packaging of Python modules'
arch=('any')
url='https://github.com/takluyver/flit'
license=('BSD')
-depends=('python' 'python-toml')
-makedepends=('python-setuptools' 'python-requests' 'python-docutils')
+depends=('python' 'python-tomli' 'python-tomli-w')
+makedepends=('python-pip' 'python-poetry' 'python-requests' 'python-docutils')
checkdepends=('python-pytest' 'python-testpath' 'python-responses')
source=("$pkgbase-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
-sha512sums=('b40768fb4b0b2a2e3116ac790dfa629da5a57cda34b10abb8ce6a8febcc3436795d5122dcfa3db2c6d07d493f00391d2ca7300112561c8ff2a0b04d77c879662')
+sha512sums=('76a713df9a85e686b5a9516b01b02779ce9e62e5bb189724d4fb62c42324ce1607d9de334c1fa88e95a10089aebba804fac0214fcbed0c47b8fc057732d63339')
prepare() {
cd $_pkgname-$pkgver
-
- # regenerate the dist without the "I don't support people using setup.py" flag
- PYTHONPATH="$PWD/flit_core/" python -m flit build --format sdist
- bsdtar --strip-components 1 -xvf \
- dist/${_pkgname}-${pkgver}.tar.gz ${_pkgname}-${pkgver}/setup.py
-
+ rm tests/test_sdist.py
cd flit_core
-
- # flit_core.buildapi does not ever generate setup.py, only `flit build` does???
- # since we still rely on them... patch the self builder to import from the flit directory's subclass
- sed -i 's/from .sdist import SdistBuilder/from flit.sdist import SdistBuilder/' flit_core/build_thyself.py
- PYTHONPATH="$PWD/../" python ./build_dists.py
- bsdtar --strip-components 1 -xvf \
- dist/flit_core-${pkgver}.tar.gz flit_core-${pkgver}/setup.py
+ python build_dists.py
}
build() {
cd $_pkgname-$pkgver
- # flit doesn't either support people invoking setup.py outside of pip. The
- # undocumented setuptools.launch reimplements the same thing, but less well
- # done. Still enough for flit to build.
- python -m setuptools.launch setup.py build
-
- cd flit_core
-
- python -m setuptools.launch setup.py build
+ PYTHONPATH=flit_core python -m flit build --format wheel
}
check() {
@@ -60,9 +42,7 @@
cd $_pkgname-$pkgver
- python -m setuptools.launch setup.py install --root="$pkgdir" --optimize=1 --skip-build
- cp -a flit/license_templates "$pkgdir"/usr/lib/python3.9/site-packages/flit/
-
+ PIP_CONFIG_FILE=/dev/null pip install --isolated --root="${pkgdir}" --ignore-installed --no-deps dist/*.whl
install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
@@ -71,10 +51,10 @@
cd $_pkgname-$pkgver/flit_core
- python -m setuptools.launch setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ PIP_CONFIG_FILE=/dev/null pip install --isolated --root="${pkgdir}" --ignore-installed --no-deps dist/*.whl
+ install -Dm 644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
# installing tests to a subdir of your project might not conflict the toplevel, but
# don't do it anyway...
rm -r "$pkgdir"/usr/lib/python*/site-packages/flit_core/tests/
-
- install -Dm 644 ../LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
More information about the arch-commits
mailing list