summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD50
2 files changed, 21 insertions, 43 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9697631f0c72..71312a9b9118 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,17 @@
pkgbase = python-typechecks
pkgdesc = Helper functions for runtime type checking
pkgver = 0.1.0
- pkgrel = 1
- url = https://pypi.python.org/pypi/typechecks
+ pkgrel = 2
+ url = https://pypi.org/project/typechecks
arch = any
license = Apache
checkdepends = python-nose
- checkdepends = python2-nose
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
- makedepends = python2-setuptools
+ makedepends = python-wheel
+ depends = python
source = python-typechecks-0.1.0.tar.gz::https://files.pythonhosted.org/packages/source/t/typechecks/typechecks-0.1.0.tar.gz
sha256sums = 7d801a6018f60d2a10aa3debc3af65f590c96c455de67159f39b9b183107c83b
pkgname = python-typechecks
- depends = python
-
-pkgname = python2-typechecks
- depends = python2
diff --git a/PKGBUILD b/PKGBUILD
index b7bc56e7f31e..267dc8c1c785 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,51 +1,31 @@
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Clint Valentine <valentine.clint@gmail.com>
-pkgbase=python-typechecks
-pkgname=('python-typechecks' 'python2-typechecks')
+pkgname=python-typechecks
+_pkg="${pkgname#python-}"
pkgver=0.1.0
-pkgrel=1
+pkgrel=2
pkgdesc="Helper functions for runtime type checking"
arch=('any')
-url="https://pypi.python.org/pypi/typechecks"
+url="https://pypi.org/project/typechecks"
license=('Apache')
-makedepends=('python-setuptools' 'python2-setuptools')
-checkdepends=('python-nose' 'python2-nose')
-source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/t/typechecks/typechecks-$pkgver.tar.gz")
+depends=('python')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
+checkdepends=('python-nose')
+source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_pkg::1}/$_pkg/$_pkg-$pkgver.tar.gz")
sha256sums=('7d801a6018f60d2a10aa3debc3af65f590c96c455de67159f39b9b183107c83b')
-prepare() {
- cp -a "typechecks-$pkgver"{,-py2}
-}
-
build(){
- pushd "typechecks-$pkgver"
- python setup.py build
- popd
-
- pushd "typechecks-$pkgver-py2"
- python2 setup.py build
+ cd "$_pkg-$pkgver"
+ python -m build --wheel --no-isolation
}
check() {
- pushd "typechecks-$pkgver"
- python setup.py nosetests
- popd
-
- pushd "typechecks-$pkgver-py2"
- python2 setup.py nosetests
+ cd "$_pkg-$pkgver"
+ nosetests
}
-package_python2-typechecks() {
- depends=('python2')
-
- cd "typechecks-$pkgver-py2"
- PYTHONHASHSEED=0 python2 setup.py install --root="$pkgdir/" --optimize=1 --skip-build
-}
-
-package_python-typechecks() {
- depends=('python')
-
- cd "typechecks-$pkgver"
- PYTHONHASHSEED=0 python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+package() {
+ cd "$_pkg-$pkgver"
+ PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl
}