blob: c1d55b40f6780d3adf370a3229e88b31c60060b5 (
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Andrzej Giniewicz <gginiu@gmail.com>
pkgbase=python-scikit-image
pkgname=('python2-scikit-image' 'python-scikit-image')
pkgver=0.14.1
pkgrel=1
pkgdesc="Image processing routines for SciPy"
arch=('i686' 'x86_64')
url="http://scikit-image.org/"
license=('BSD')
_deppy2=(
'python2>=2.7'
'python2<2.8'
)
_deppy=(
'python>=3.7'
'python<3.8'
)
_depends=('python-scipy' 'python-matplotlib' 'python-networkx'
'python-pillow' 'python-pywavelets')
_makedepends=(
'cython>=0.23'
'python-six'
)
_optdepends=(
'python-pyqt4: for imshow(x, fancy=True) and skivi'
'freeimage: for reading various types of image file formats'
'python-pyamg: fast cg_mg mode of random walker segmentation'
)
makedepends=(
"${_deppy[@]}"
"${_deppy2[@]}"
"${_depends[@]}"
"${_depends[@]/python-/python2-}"
"${_makedepends[@]}"
"${_makedepends[@]/ython/ython2}"
)
options=('!emptydirs')
source=(https://pypi.python.org/packages/a4/5d/05d40ad281cb16bc9dbd91982a918162b374c43e84eb2c8f7070e4be6729/scikit-image-${pkgver}.tar.gz)
sha512sums=('30c2b7c985568f9b03b82be4839c16882adfdec664f69293aaccf1deee12305e88d42ff9a6f193a46e4ecd1337b032d319a1b7ea1a0fdbb01f96451cf7ed73cf')
prepare() {
cd "${srcdir}"
cp -a scikit-image-$pkgver scikit-image-py2-$pkgver
cd scikit-image-py2-$pkgver
sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
-i $(find . -name '*.py')
}
build() {
echo "Building Python2"
cd "${srcdir}"/scikit-image-py2-$pkgver
python2 setup.py build
echo "Building Python3"
cd "${srcdir}"/scikit-image-$pkgver
python setup.py build
}
package_python2-scikit-image() {
depends=(
"${_deppy2[@]}"
"${_depends[@]/python-/python2-}"
)
optdepends=(
"${_optdepends[@]/python-/python2-}"
)
cd "${srcdir}"/scikit-image-py2-$pkgver
python2 setup.py install --root="${pkgdir}"/ --optimize=1
mv "${pkgdir}"/usr/bin/skivi "${pkgdir}"/usr/bin/skivi2
install -D LICENSE.txt "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
}
package_python-scikit-image() {
depends=(
"${_deppy2[@]}"
"${_depends[@]}"
)
optdepends=(
"${_optdepends[@]}"
)
cd "${srcdir}"/scikit-image-$pkgver
python setup.py install --root="${pkgdir}"/ --optimize=1
install -D LICENSE.txt "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
}
|