[arch-commits] Commit in python-radon/repos (community-any community-any/PKGBUILD)
Jelle van der Waa
jelle at archlinux.org
Sun Dec 30 16:01:18 UTC 2018
Date: Sunday, December 30, 2018 @ 16:01:17
Author: jelle
Revision: 419335
archrelease: copy trunk to community-any
Added:
python-radon/repos/community-any/
python-radon/repos/community-any/PKGBUILD
(from rev 419334, python-radon/trunk/PKGBUILD)
----------+
PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
Copied: python-radon/repos/community-any/PKGBUILD (from rev 419334, python-radon/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2018-12-30 16:01:17 UTC (rev 419335)
@@ -0,0 +1,43 @@
+# Maintainer: Jelle van der Waa <jelle at archlinux.org>
+# Contributor: Christopher Arndt <aur at chrisarndt dot de>
+# Contributor: Simon Conseil <contact+aur at saimon dot org>
+# Contributor: Jesus Alvarez
+
+_name=radon
+pkgname=python-radon
+pkgver=2.4.0
+pkgrel=1
+arch=('any')
+url="https://github.com/rubik/radon"
+license=('MIT')
+pkgdesc="A tool that computes various metrics for Python source code"
+depends=('python-mando' 'python-colorama' 'python-flake8-polyfill' 'python-setuptools')
+checkdepends=('python-pytest' 'python-pytest-mock')
+makedepends=('python-sphinx' 'python2-sphinx')
+source=(https://github.com/rubik/radon/archive/v${pkgver}.tar.gz)
+sha512sums=('342950b40cb88b45e3e32338c1b9801a5ed5807a3370a150410e22c610e0c77f41860156306f1e55b17ff3a831806536fd5b965761c68a1a44dceaf54e742dce')
+
+build() {
+ cd "${_name}-${pkgver}"
+ sed -i -e "s/mando[^']*/mando/" -e "s/colorama[^']*/colorama/" setup.py
+ python setup.py build
+ cd docs
+ make html
+}
+
+check() {
+ cd "${_name}-${pkgver}/radon"
+ pytest tests/test_cli_tools.py tests/test_cli_harvest.py tests/test_complexity_utils.py \
+ tests/test_complexity_visitor.py tests/test_halstead.py
+}
+
+package() {
+ cd "${_name}-${pkgver}"
+ python setup.py install --root="$pkgdir" --skip-build --optimize=1
+
+ install -d "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r docs/_build/html/* "${pkgdir}/usr/share/doc/${pkgname}"
+
+ # license
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
More information about the arch-commits
mailing list