summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2022-03-04 15:07:31 -0600
committerLuis Martinez2022-03-04 15:07:31 -0600
commita7aeac6957aa396ae939b0a36941c6f33419ee1d (patch)
tree26958ef806655e5406d315b88f6b55a8e0952e19
parenta4059855ac6f8d79d8a94ed446a2db8e1cd17dc3 (diff)
downloadaur-a7aeac6957aa396ae939b0a36941c6f33419ee1d.tar.gz
update PKGBUILD according to new Python packaging guidelines
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD28
2 files changed, 22 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c6179a2af866..51cf87d5f754 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,18 @@
pkgbase = python-nclib
pkgdesc = Netcat as a library: convienent socket interfaces
pkgver = 1.0.1
- pkgrel = 1
+ pkgrel = 2
url = https://pypi.python.org/pypi/nclib
arch = any
license = MIT
makedepends = python-setuptools
+ makedepends = python-build
+ makedepends = python-installer
+ makedepends = python-wheel
depends = python
- source = https://files.pythonhosted.org/packages/source/n/nclib/nclib-1.0.1.tar.gz
- source = https://raw.githubusercontent.com/rhelmot/nclib/release/stable/LICENSE
- sha512sums = bafa3a1aa9c83c7a1cd0d32485c4a16bfaa7d0ff720dacfef60c720353bd393ee33ffe959341488b82d9bcebf09e2e7d0873e586cea78104b69f49a0029ccbf5
- sha512sums = caafbd65a0d0088eef0980ec3b72d7e6a001986d3dbd329a8c1c0ffe2ebcf212ce6be0cf7c19aff88389c9bc16022e4ec6f073cf79e24bcfd88bb126104e6af9
+ source = python-nclib-1.0.1.tar.gz::https://files.pythonhosted.org/packages/source/n/nclib/nclib-1.0.1.tar.gz
+ source = LICENSE::https://github.com/rhelmot/nclib/raw/release/stable/LICENSE
+ sha256sums = 9d41adb7df01a3fead10bc9698a175936b263d6bd18997078ed17e4fa61734d1
+ sha256sums = 72e0913251cf7d16cc7ee6ff3d0e97631414c4777b46531c8a53328da4ab8df4
pkgname = python-nclib
-
diff --git a/PKGBUILD b/PKGBUILD
index 4f7d1d8f85b9..8eae8cd39b06 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,29 @@
-# Maintainer: George Rawlinson <george@rawlinson.net.nz>
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Contributor: George Rawlinson <george@rawlinson.net.nz>
# Contributor: Pochang Chen <johnchen902@gmail.com>
pkgname=python-nclib
-_name=nclib
pkgver=1.0.1
-pkgrel=1
+pkgrel=2
pkgdesc="Netcat as a library: convienent socket interfaces"
license=('MIT')
arch=('any')
url="https://pypi.python.org/pypi/nclib"
depends=('python')
-makedepends=('python-setuptools')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
- "https://raw.githubusercontent.com/rhelmot/nclib/release/stable/LICENSE")
-sha512sums=('bafa3a1aa9c83c7a1cd0d32485c4a16bfaa7d0ff720dacfef60c720353bd393ee33ffe959341488b82d9bcebf09e2e7d0873e586cea78104b69f49a0029ccbf5'
- 'caafbd65a0d0088eef0980ec3b72d7e6a001986d3dbd329a8c1c0ffe2ebcf212ce6be0cf7c19aff88389c9bc16022e4ec6f073cf79e24bcfd88bb126104e6af9')
+makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
+source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/n/nclib/nclib-$pkgver.tar.gz"
+ "LICENSE::https://github.com/rhelmot/nclib/raw/release/stable/LICENSE")
+sha256sums=('9d41adb7df01a3fead10bc9698a175936b263d6bd18997078ed17e4fa61734d1'
+ '72e0913251cf7d16cc7ee6ff3d0e97631414c4777b46531c8a53328da4ab8df4')
build() {
- cd "$_name-$pkgver"
- python setup.py build
+ cd "nclib-$pkgver"
+ python -m build --wheel --no-isolation
}
package() {
- cd "$_name-$pkgver"
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build
-
- install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" "$srcdir/LICENSE"
+ export PYTHONHASHSEED=0
+ cd "nclib-$pkgver"
+ python -m installer --destdir="$pkgdir/" dist/*.whl
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" "$srcdir/LICENSE"
}