[arch-commits] Commit in python-uhi/trunk (PKGBUILD)

Antonio Rojas arojas at gemini.archlinux.org
Mon Aug 1 08:17:07 UTC 2022


    Date: Monday, August 1, 2022 @ 08:17:06
  Author: arojas
Revision: 1259608

upgpkg: python-uhi 0.3.1-2: drop dephell usage

Modified:
  python-uhi/trunk/PKGBUILD

----------+
 PKGBUILD |   21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-08-01 08:12:02 UTC (rev 1259607)
+++ PKGBUILD	2022-08-01 08:17:06 UTC (rev 1259608)
@@ -3,36 +3,31 @@
 _pkgname='uhi'
 pkgname="python-${_pkgname}"
 pkgver='0.3.1'
-pkgrel=1
+pkgrel=2
 pkgdesc="Contains the code for the PlottableHistogram Protocol, to be used in type checking libraries wanting to conform to the protocol."
 arch=('any')
 url='https://github.com/scikit-hep/uhi'
 license=('MIT')
 depends=('python-numpy' 'python-typing_extensions' 'root')
-makedepends=('git' 'python-setuptools' 'python-dephell')
+makedepends=('git' 'python-build' 'python-installer' 'python-flit-core' 'python-flit')
 checkdepends=('python-pytest' 'python-boost-histogram' 'python-importlib-metadata')
 source=("${pkgname}-${pkgver}::git+${url}#tag=v${pkgver}")
 sha256sums=('SKIP')
 
-prepare() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  dephell deps convert --from pyproject.toml --to setup.py
-}
-
 build() {
-  cd "${srcdir}/${pkgname}-${pkgver}"
-  # tests rely on egg-info metadata
-  python setup.py bdist_egg
+  cd ${pkgname}-${pkgver}
+  python -m build --wheel --no-isolation
 }
 
 check() {
   cd "${srcdir}/${pkgname}-${pkgver}"
-  cp -r src/"${_pkgname}".egg-info build/lib/
-  PYTHONPATH="${PWD}/build/lib:${PWD}" pytest
+  python -m venv --system-site-packages test-env
+  test-env/bin/python -m installer dist/*.whl
+  test-env/bin/python -m pytest
 }
 
 package() {
   cd "${srcdir}/${pkgname}-${pkgver}"
-  python setup.py install --skip-build --root="${pkgdir}/" --optimize=1
+  python -m installer --destdir="${pkgdir}" dist/*.whl
   install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 }



More information about the arch-commits mailing list