summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Aznarán Laos2022-01-10 08:59:18 -0500
committerCarlos Aznarán Laos2022-01-10 08:59:18 -0500
commit2314e7850ba94ed69ad8671539ce36a03f130538 (patch)
treeac51c1b5c81360cfedb498feb524c22ab1941644
parent2975697693ab9c31207115eb473752948fee9059 (diff)
downloadaur-2314e7850ba94ed69ad8671539ce36a03f130538.tar.gz
Add check() function
-rw-r--r--.SRCINFO11
-rw-r--r--LICENSE21
-rw-r--r--PKGBUILD36
3 files changed, 25 insertions, 43 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c8b3217a16be..31d636a92886 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
pkgbase = python-colorspacious
pkgdesc = A powerful, accurate, and easy-to-use Python library for doing colorspace conversions
pkgver = 1.1.2
- pkgrel = 1
- url = http://colorspacious.readthedocs.org/en/latest/
+ pkgrel = 2
+ url = https://github.com/njsmith/colorspacious
arch = any
license = MIT
+ checkdepends = python-nose
+ makedepends = python-setuptools
depends = python-numpy
source = https://github.com/njsmith/colorspacious/archive/v1.1.2.tar.gz
- source = LICENSE
- md5sums = 6736faaad92c6c75931fb34d86767d11
- md5sums = 032f6276b1a63e4062c163daae656d61
+ sha512sums = c633ba1ee051eab055d74752b3efd02fdff9acd641f245d80339d698bf4f5a28701158a50ddd2c372730d7e5cbb1e29858c4acd1f3594e07fe7bdfaa2fed87f6
pkgname = python-colorspacious
-
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 8ec21cf7adf5..000000000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014-2015 Colorspacious developers
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/PKGBUILD b/PKGBUILD
index 80475c27338f..e26c6d72e55c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,29 @@
-# Contributor: Antony Lee <anntzer dot lee at gmail dot com>
-
-pkgname=python-colorspacious
+_base=colorspacious
+pkgname=python-${_base}
+pkgdesc="A powerful, accurate, and easy-to-use Python library for doing colorspace conversions"
pkgver=1.1.2
-pkgrel=1
-pkgdesc='A powerful, accurate, and easy-to-use Python library for doing colorspace conversions'
-url='http://colorspacious.readthedocs.org/en/latest/'
-depends=('python-numpy')
-license=('MIT')
+pkgrel=2
arch=('any')
-source=("https://github.com/njsmith/colorspacious/archive/v$pkgver.tar.gz"
- 'LICENSE')
-md5sums=('6736faaad92c6c75931fb34d86767d11'
- '032f6276b1a63e4062c163daae656d61')
+url="https://github.com/njsmith/${_base}"
+license=(MIT)
+depends=(python-numpy)
+makedepends=(python-setuptools)
+checkdepends=(python-nose)
+source=(${url}/archive/v${pkgver}.tar.gz)
+sha512sums=('c633ba1ee051eab055d74752b3efd02fdff9acd641f245d80339d698bf4f5a28701158a50ddd2c372730d7e5cbb1e29858c4acd1f3594e07fe7bdfaa2fed87f6')
build() {
- cd colorspacious-"$pkgver"
+ cd "${_base}-${pkgver}"
python setup.py build
}
+check() {
+ nosetests --all-modules "${_base}-${pkgver}"
+}
+
package() {
- cd colorspacious-"$pkgver"
- python setup.py install --root="$pkgdir" --optimize=1
- install -D -m644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ 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.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
}