Date: Wednesday, November 30, 2022 @ 10:30:40 Author: dvzrv Revision: 1355396
upgpkg: python-phpserialize 1.3-10: Rebuild to fix several issues. Switch to specific version of LICENSE file. Switch to PEP517. Replace use of deprecated setuptools based test call with direct call to test file. Modified: python-phpserialize/trunk/PKGBUILD ----------+ PKGBUILD | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-11-30 09:52:21 UTC (rev 1355395) +++ PKGBUILD 2022-11-30 10:30:40 UTC (rev 1355396) @@ -1,28 +1,31 @@ -# Maintainer: David Runge <[email protected]> +# Maintainer: David Runge <[email protected]> + _name=phpserialize pkgname=python-phpserialize pkgver=1.3 -pkgrel=9 +pkgrel=10 pkgdesc="A port of the serialize and unserialize functions of php to python" -arch=('any') +arch=(any) url="https://github.com/mitsuhiko/phpserialize" -license=('BSD') -depends=('python') -makedepends=('python-setuptools') -checkdepends=('python-pytest') +license=(BSD) +depends=(python) +makedepends=(python-build python-installer python-setuptools python-wheel) # tests not included in pypi source: # https://github.com/mitsuhiko/phpserialize/issues/21 # LICENSE not in any source tarball: # https://github.com/mitsuhiko/phpserialize/issues/22 #source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz") -source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mitsuhiko/${_name}/archive/${pkgver}.tar.gz" - "https://raw.githubusercontent.com/mitsuhiko/${_name}/master/LICENSE") +source=( + $pkgname-$pkgver.tar.gz::https://github.com/mitsuhiko/$_name/archive/$pkgver.tar.gz + https://raw.githubusercontent.com/mitsuhiko/phpserialize/46a7e5d443757dedaaff4f6b1b8ae5e020210e0e/LICENSE +) sha512sums=('d96e3aa87d2f03fef6c7cee234e90b373989a9c8e3a07a8e2147a2e7487d3448ea0ef646263e517d6b307bf66f9ba1a4e8def04f919767532cede802cc7db144' '95be97fbe3b8d03ba27aee2d9f5e29ff2923425970103f8b15f13e36beb744e8bc1f9361e89b05d2e9677368b5ab95c5ad84722e3523b3b8574e2d94b69f2d3e') +b2sums=('63a5e88c93ae5c75c476deb8ceb37fd3e250c86e745a587eca0ae2ff4484f923f0f50f31002176d3ce8c38585d827212b9c45a4b701a9f5ffe1782ee336bb2fa' + '0c39d868b4457af6108d6a2572d88e06114ef2fabd60d4f87493eae4b8f76aad4ba66676845ad9eb8154c5a14e498fddaa83037200ab4288e385410ab8be759c') prepare() { - mv -v "${_name}-$pkgver" "$pkgname-$pkgver" - cd "$pkgname-$pkgver" + cd $_name-$pkgver # disabling broken test: https://github.com/mitsuhiko/phpserialize/issues/17 sed -e 's/test_tuple_roundtrips/disabled_test_tuple_roundtrips/' \ -e 's/test_dumps_dict/disabled_test_dumps_dict/' \ @@ -30,21 +33,18 @@ } build() { - cd "$pkgname-$pkgver" - python setup.py build + cd $_name-$pkgver + python -m build --wheel --no-isolation } check() { - cd "$pkgname-$pkgver" - python setup.py test + cd $_name-$pkgver + python tests.py } package() { - cd "$pkgname-$pkgver" - python setup.py install --skip-build \ - --optimize=1 \ - --prefix=/usr \ - --root="${pkgdir}" - install -vDm 644 ../LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" - install -vDm 644 README -t "${pkgdir}/usr/share/doc/${pkgname}" + cd $_name-$pkgver + python -m installer --destdir="$pkgdir" dist/*.whl + install -vDm 644 ../LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/" + install -vDm 644 README -t "$pkgdir/usr/share/doc/$pkgname/" }
