summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD25
1 files changed, 11 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1b06553717f0..4189a13a1a2f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,33 +2,30 @@
pkgname=python-strenum
_name=StrEnum
pkgver=0.4.7
-pkgrel=1
+pkgrel=2
pkgdesc="A Python Enum that inherits from str."
arch=('any')
url="https://github.com/irgeek/StrEnum"
license=('MIT')
depends=('python')
-makedepends=('python-setuptools')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz"
- "https://raw.githubusercontent.com/irgeek/StrEnum/v$pkgver/LICENSE")
-sha256sums=('6019e9cc1738af6a236c022b82184372178ecadf12438f11f5b680a02a462377'
- 'bcd733d0a46522162b95dbab61f7cdc1c3e36861dfa127d68a4435240d36ad36')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
+checkdepends=('python-pytest-black' 'python-pytest-cov' 'python-pytest-pylint' 'python-pytest-runner')
+source=("$_name-$pkgver.tar.gz::https://github.com/irgeek/StrEnum/archive/refs/tags/v$pkgver.tar.gz")
+sha256sums=('996e2ebf5eab505dbfdf2c03ea0c54753dde352e1aa31a930b0e917962bedd2f')
-prepare() {
+build() {
cd "$_name-$pkgver"
-
- # Does not require pytest-runner to build
- sed -i '/setup_requires/d' ./setup.py
+ python -m build --wheel --no-isolation
}
-build() {
+check() {
cd "$_name-$pkgver"
- python setup.py build
+ pytest
}
package() {
cd "$_name-$pkgver"
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ python -m installer --destdir="$pkgdir" dist/*.whl
- install -Dm644 $srcdir/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}