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

Bruno Pagani archange at archlinux.org
Sat Dec 14 16:28:31 UTC 2019


    Date: Saturday, December 14, 2019 @ 16:28:31
  Author: archange
Revision: 537657

Build from source instead of using pip

Modified:
  python-ruamel-yaml/trunk/PKGBUILD

----------+
 PKGBUILD |   29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-12-14 14:54:11 UTC (rev 537656)
+++ PKGBUILD	2019-12-14 16:28:31 UTC (rev 537657)
@@ -1,22 +1,29 @@
 # Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Bruno Pagani <archange at archlinux.org>
 # Contributor: Samuel Littley <aur at toastwaffle.com>
 # Contributor: rnons <remotenonsense at gmail dot com>
 
-pkgname=python-ruamel-yaml
+_pkg=ruamel.yaml
+pkgname=python-${_pkg/./-}
 pkgver=0.16.5
-pkgrel=3
+pkgrel=4
 pkgdesc="YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order"
-arch=('x86_64')
+arch=(x86_64)
 url="https://bitbucket.org/ruamel/yaml"
-license=("MIT")
-makedepends=('python-pip' 'python-wheel')
-source=("https://pypi.io/packages/source/r/ruamel.yaml/ruamel.yaml-$pkgver.tar.gz")
+license=(MIT)
+depends=(python)
+makedepends=(python-setuptools)
+source=(https://files.pythonhosted.org/packages/source/r/${_pkg}/${_pkg}-${pkgver}.tar.gz)
 sha512sums=('411eac7fd607acaa33f28e642591a1ba9e3e905a5c141383a7168cb36c703b98da2ab90ebfeed77165fd5f6271756d07780a2ed9829fecf417cbda926a0214b9')
 
+build() {
+  cd ${_pkg}-${pkgver}
+  python setup.py build
+}
+
 package() {
-  depends=('python')
-
-  cd ruamel.yaml-$pkgver
-  LC_CTYPE=en_US.UTF-8 pip install . --root="$pkgdir"
-  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  cd ${_pkg}-${pkgver}
+  # https://bitbucket.org/ruamel/yaml/issues/114/setuppy-requirement-for-pip-prevents
+  RUAMEL_NO_PIP_INSTALL_CHECK=1 python setup.py install --skip-build --root="${pkgdir}" --optimize=1
+  install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/
 }



More information about the arch-commits mailing list