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

Bruno Pagani archange at archlinux.org
Wed Dec 23 12:54:24 UTC 2020


    Date: Wednesday, December 23, 2020 @ 12:54:24
  Author: archange
Revision: 784207

upgpkg: python-cloudpickle 1.6.0-1

Also enable tests and lint PKGBUILD

Modified:
  python-cloudpickle/trunk/PKGBUILD

----------+
 PKGBUILD |   48 ++++++++++++++++++++++++++++++++----------------
 1 file changed, 32 insertions(+), 16 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-12-23 12:41:07 UTC (rev 784206)
+++ PKGBUILD	2020-12-23 12:54:24 UTC (rev 784207)
@@ -1,27 +1,43 @@
 # Maintainer: Muflone http://www.muflone.com/contacts/english/
 # Contributor: Chris Warrick <aur at chriswarrick.com>
 
-pkgname=python-cloudpickle
-_pkgname=cloudpickle
-pkgver=1.2.2
-pkgrel=5
-pkgdesc='Extended pickling support for Python objects'
-arch=('any')
-url='https://github.com/cloudpipe/cloudpickle'
-license=('BSD')
-makedepends=('python-setuptools')
-depends=('python-setuptools')
+_pkg=cloudpickle
+pkgname=python-${_pkg}
+pkgver=1.6.0
+pkgrel=1
+pkgdesc="Extended pickling support for Python objects"
+arch=(any)
+url="https://github.com/cloudpipe/cloudpickle"
+license=(BSD)
+depends=(python-setuptools)
+checkdepends=(
+    python-pytest
+    python-psutil
+    python-tornado
+    python-numpy
+)
 options=(!emptydirs)
-source=("https://pypi.io/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
-sha256sums=('922401d7140e133253ff5fab4faa4a1166416066453a783b00b507dca93f8859')
+source=(https://files.pythonhosted.org/packages/source/${_pkg::1}/${_pkg}/${_pkg}-${pkgver}.tar.gz)
+sha256sums=('9bc994f9e9447593bd0a45371f0e7ac7333710fcf64a4eb9834bf149f4ef2f32')
 
 build() {
-  cd "${_pkgname}-${pkgver}"
+  cd ${_pkg}-${pkgver}
   python setup.py build
 }
 
+check() {
+  cd ${_pkg}-${pkgver}
+  cd tests/cloudpickle_testpkg
+  python setup.py build
+  cd ../../
+  PYTHONPATH="${PWD}"/tests/cloudpickle_testpkg/build/lib/ \
+  pytest --deselect tests/cloudpickle_file_test.py::CloudPickleFileTests::test_pickling_special_file_handles \
+         --deselect tests/cloudpickle_test.py::CloudPickleTest::test_pickling_file_handles \
+         --deselect tests/cloudpickle_test.py::Protocol2CloudPickleTest::test_pickling_file_handles
+}
+
 package() {
-  cd "${_pkgname}-${pkgver}"
-  python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
-  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  cd ${_pkg}-${pkgver}
+  python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
+  install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/
 }



More information about the arch-commits mailing list