summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Aznarán Laos2021-12-11 12:31:58 -0500
committerCarlos Aznarán Laos2021-12-11 12:31:58 -0500
commit0f921892a29f9f429c6866e097d984c08e7f03f5 (patch)
tree606816ec46021729b51114405fdf3183ec391c47
parent2036fc518a76238e6363356e3dc9ec074c6a71a3 (diff)
downloadaur-0f921892a29f9f429c6866e097d984c08e7f03f5.tar.gz
Add check() function
-rw-r--r--.SRCINFO8
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD40
3 files changed, 28 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a8a33b8648b8..e10919eaa57d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,13 @@
pkgbase = python-flake8-class-newline
- pkgdesc = Flake lint for newline after class definitions.
+ pkgdesc = Flake8 lint for newline after class definitions
pkgver = 1.6.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/AlexanderVanEck/flake8-class-newline
arch = any
license = MIT
+ makedepends = python-setuptools
depends = flake8
source = https://github.com/AlexanderVanEck/flake8-class-newline/archive/1.6.0.tar.gz
- md5sums = abf91dad16b08ec69b13b12886550774
+ sha512sums = 83ea8fee354665cac61352a3356ffbe883577eb0adc9560477cad3daf021a547372cc3488a64e1bb2321265aaaa636385539edd57c07eafc3fcacc09e81801b2
pkgname = python-flake8-class-newline
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f59ec20aabf5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+* \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
index e6fa8d94df51..a3b7aa0e38be 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,31 @@
-# Maintainer: acxz <akashpatel2008@yahoo.com>
-
-pkgname="python-flake8-class-newline"
-_pkgname="flake8-class-newline"
+# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
+# Contributor: acxz <akashpatel2008@yahoo.com>
+_base=flake8-class-newline
+pkgname=python-${_base}
pkgver=1.6.0
-pkgrel=1
-pkgdesc="Flake lint for newline after class definitions."
+pkgrel=2
+pkgdesc="Flake8 lint for newline after class definitions"
arch=('any')
-url="https://github.com/AlexanderVanEck/${_pkgname}"
-license=('MIT')
-depends=('flake8')
-source=("https://github.com/AlexanderVanEck/flake8-class-newline/archive/$pkgver.tar.gz")
-md5sums=('abf91dad16b08ec69b13b12886550774')
+url="https://github.com/AlexanderVanEck/${_base}"
+license=(MIT)
+depends=(flake8)
+makedepends=(python-setuptools)
+source=(${url}/archive/${pkgver}.tar.gz)
+sha512sums=('83ea8fee354665cac61352a3356ffbe883577eb0adc9560477cad3daf021a547372cc3488a64e1bb2321265aaaa636385539edd57c07eafc3fcacc09e81801b2')
build() {
- cd "${_pkgname}-${pkgver}"
- python setup.py build
+ cd "${_base}-${pkgver}"
+ python setup.py build
}
-package() {
- cd "${_pkgname}-${pkgver}"
- python setup.py install --root="${pkgdir}" --optimize=1
+check() {
+ cd "${_base}-${pkgver}"
+ python setup.py test
+}
- install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+package() {
+ cd "${_base}-${pkgver}"
+ export PYTHONHASHSEED=0
+ PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}