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

Eli Schwartz eschwartz at archlinux.org
Tue Jan 1 15:07:30 UTC 2019


    Date: Tuesday, January 1, 2019 @ 15:07:30
  Author: eschwartz
Revision: 420168

various build cleanups

- use source url that does not change every release due to embedded checkums
- use pkgver variable in source url

- don't download PyPI eggs during build
- do build in build() function instead of during package()

Modified:
  python-cheroot/trunk/PKGBUILD

----------+
 PKGBUILD |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-01-01 14:50:16 UTC (rev 420167)
+++ PKGBUILD	2019-01-01 15:07:30 UTC (rev 420168)
@@ -13,7 +13,7 @@
 makedepends=('python-six' 'python2-six' 'python-setuptools-scm'
   'python2-setuptools-scm' 'python2-backports.functools_lru_cache'
   'python2-backports.unittest_mock' 'tree')
-source=("${pkgbase}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/c4/ab/b3800499ccec7f058fe080ae7f79207f9b498559edd1467d533a2126767c/cheroot-6.5.2.tar.gz"
+source=("https://files.pythonhosted.org/packages/source/${_pkgbase:0:1}/${_pkgbase}/${_pkgbase}-${pkgver}.tar.gz"
         "LICENSE"
         "cheroot-fix-setup-python3.patch")
 sha512sums=('f31026050a45720a0aa08204607b521ae2c0666220886bd14f1f53f81411a66a8ff17e42640efb5189e998f3dfda2fbe41a2c18672dd83c52e9d8ad356cab264'
@@ -23,8 +23,16 @@
 prepare() {
   cd "${srcdir}/${_pkgbase}-${pkgver}"
   patch -p1 -N -i "${srcdir}/cheroot-fix-setup-python3.patch"
+  # git-archive support is not needed since we use PyPI tarballs
+  sed -i '/setuptools_scm_git_archive/d' setup.py
 }
 
+build() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python setup.py build
+  python2 setup.py build
+}
+
 package_python-cheroot() {
   depends=('python-six')
 



More information about the arch-commits mailing list