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

Jonas Witschel diabonas at gemini.archlinux.org
Tue Nov 23 14:02:53 UTC 2021


    Date: Tuesday, November 23, 2021 @ 14:02:52
  Author: diabonas
Revision: 1054460

python-python-socks: use signed git tag as source

Modified:
  python-python-socks/trunk/PKGBUILD

----------+
 PKGBUILD |   19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-11-23 13:53:42 UTC (rev 1054459)
+++ PKGBUILD	2021-11-23 14:02:52 UTC (rev 1054460)
@@ -1,6 +1,7 @@
 # Maintainer: Jonas Witschel <diabonas at archlinux.org>
 pkgname=python-python-socks
 pkgver=2.0.0
+_tag=c56dd42d51e2d88f04ecf23c05da9f0ce8bdabde # git rev-parse "v$pkgver"
 pkgrel=1
 pkgdesc='Core proxy client (SOCKS4, SOCKS5, HTTP) functionality for Python'
 arch=('any')
@@ -7,26 +8,32 @@
 url='https://github.com/romis2012/python-socks'
 license=('APACHE')
 depends=('python') 
-makedepends=('python-setuptools')
+makedepends=('git' 'python-setuptools')
 checkdepends=('python-async-timeout' 'python-curio' 'python-flask' 'python-pytest'
               'python-pytest-asyncio' 'python-pytest-trio' 'python-trio' 'python-yarl')
 optdepends=('python-async-timeout: asyncio support'
             'python-curio: curio support'
             'python-trio: trio support')
-source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
-sha512sums=('088a606ca6e13de79cfa8b180d76e91cca129b3e1ffad2243e5924dc10530340924ea815eb9af0e53b5369daa9cf3e66b2f623da6913ed32916b91d24a47c1e4')
+source=("git+$url.git?signed#tag=$_tag")
+sha512sums=('SKIP')
+validpgpkeys=('706A8935FED55F3BFB7C188B5EEAD7400A5D80ED') # Roman Snegirev <rsng at mail.ru>
 
+pkgver() {
+	cd "${pkgname#python-}"
+	git describe | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g'
+}
+
 build() {
-	cd "${pkgname#python-}-$pkgver"
+	cd "${pkgname#python-}"
 	python setup.py build
 }
 
 check() {
-	cd "${pkgname#python-}-$pkgver"
+	cd "${pkgname#python-}"
 	pytest
 }
 
 package() {
-	cd "${pkgname#python-}-$pkgver"
+	cd "${pkgname#python-}"
 	python setup.py install --root="$pkgdir" --optimize=1 --skip-build
 }



More information about the arch-commits mailing list