blob: c740694ee6d027c39669ecb044985aa56777ef81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Maintainer: Astro Benzene <universebenzene at sina dot com>
pkgbase=python-chalk-planar
_pname=${pkgbase#python-}
_pyname=${_pname//-/_}
pkgname=("python-${_pname}" "python-${_pname}-doc")
pkgver=0.4
pkgrel=1
pkgdesc="2D planar geometry library for Python."
arch=('any')
url="https://github.com/chalk-diagrams/planar"
license=('BSD-3-Clause')
makedepends=('python-setuptools')
# 'python-wheel'
# 'python-build'
# 'python-installer'
# 'python-sphinx')
checkdepends=('python-pytest'
'python-nose')
source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
# "https://files.pythonhosted.org/packages/source/p/planar/planar-${pkgver}.tar.gz")
md5sums=('20c10fe5d5fc8405094c73e3f638ea76')
build() {
cd ${srcdir}/${_pyname}-${pkgver}
python setup.py build
# python -m build --wheel --no-isolation
# msg "Building Docs"
# pythonpath="../build/lib" make -C doc html
}
check() {
cd ${srcdir}/${_pyname}-${pkgver}
pytest \
--ignore=test/test_box.py \
--ignore=test/test_line.py \
--ignore=test/test_polygon.py \
--ignore=test/test_transform.py \
--ignore=test/test_vector.py || warning "Tests failed" # -vv -l -ra --color=yes -o console_output_style=count
# python -m nose.core -d -w build/lib/ --with-coverage --cover-erase
}
package_python-chalk-planar() {
depends=('python')
optdepends=('python-chalk-planar-doc: Documentation for chalk planar')
cd ${srcdir}/${_pyname}-${pkgver}
install -D -m644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -D -m644 README.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
# python -m installer --destdir="${pkgdir}" dist/*.whl
}
package_python-chalk-planar-doc() {
pkgdesc="Documentation for chalk planar"
cd ${srcdir}/${_pyname}-${pkgver}/doc/build
install -D -m644 ../../LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -d -m755 "${pkgdir}/usr/share/doc/${pkgbase}"
cp -a html "${pkgdir}/usr/share/doc/${pkgbase}"
}
|