[arch-commits] Commit in python-icalendar/trunk (PKGBUILD)
Daniel M. Capella
polyzen at gemini.archlinux.org
Sun Sep 4 19:22:41 UTC 2022
Date: Sunday, September 4, 2022 @ 19:22:40
Author: polyzen
Revision: 1292881
upgpkg: python-icalendar 4.1.0-2: Use PEP 517
Modified:
python-icalendar/trunk/PKGBUILD
----------+
PKGBUILD | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-09-04 19:22:30 UTC (rev 1292880)
+++ PKGBUILD 2022-09-04 19:22:40 UTC (rev 1292881)
@@ -6,14 +6,15 @@
_name=icalendar
pkgname=python-icalendar
pkgver=4.1.0
-pkgrel=1
+pkgrel=2
pkgdesc='A parser/generator of iCalendar files (RFC 2445)'
arch=('any')
url="https://github.com/collective/icalendar"
license=('BSD')
depends=('python-dateutil' 'python-pytz')
-makedepends=('python-setuptools')
-checkdepends=('python-hypothesis' 'python-pytest')
+makedepends=('python-build' 'python-installer' 'python-setuptools'
+ 'python-wheel')
+checkdepends=('python-pytest')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
sha256sums=('9748b7c02efcc43e58d0615ae0976ac4f265e90dadee9b4f884de29905c1b395')
b2sums=('a676b938101e901c45cfeceba031c35f26dc361832ca24877acefcbe9158e111d883b757a133d72901579f73b32e34adbcb47db6d8ccbaa49f013106c282401e')
@@ -20,20 +21,23 @@
build() {
cd "${_name}-${pkgver}"
- python setup.py build
+ python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
cd "${_name}-${pkgver}"
- PYTHONPATH="${PWD}:${PYTHONPATH}"
pytest -v "src/${_name}/tests"
}
package() {
cd "${_name}-${pkgver}"
- python setup.py install --optimize=1 --root="${pkgdir}"
+ python -m installer --destdir="${pkgdir}" dist/*.whl
install -vDm 644 {CHANGES,CONTRIBUTING,README}.rst \
-t "${pkgdir}/usr/share/doc/${pkgname}/"
- install -vDm 644 LICENSE.rst \
- -t "${pkgdir}/usr/share/licenses/${pkgname}"
+
+ # Symlink license file
+ local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+ install -d "${pkgdir}"/usr/share/licenses/${pkgname}
+ ln -s "${site_packages}"/${_name}-${pkgver}.dist-info/LICENSE.rst \
+ "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.rst
}
More information about the arch-commits
mailing list