blob: 34062d9b8ab3a2e3042140d2f161e1a3fbebba9c (
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
|
# Maintainer: Butui Hu <hot123tea123@gmail.com>
pkgname=python-torchgan-git
pkgver=0.1.0.r2.gf413953
pkgrel=2
pkgdesc='Research Framework for easy and efficient training of GANs based on PyTorch'
arch=('any')
url='https://github.com/torchgan/torchgan'
license=('MIT')
depends=(
python-numpy
python-pillow
python-pytorch
python-torchvision
)
makedepends=(
git
python-setuptools
)
provides=(python-torchgan=${pkgver})
conflicts=(python-torchgan)
source=("${pkgname}::git+https://github.com/torchgan/torchgan.git")
sha512sums=('SKIP')
get_pyver () {
python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
}
pkgver() {
cd "${pkgname}"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "${pkgname}"
python setup.py build
}
package() {
cd "${pkgname}"
python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
# delete tests folder as they're installed in wrong place
rm -rfv "${pkgdir}/usr/lib/python$(get_pyver)/site-packages/tests"
}
# vim:set ts=2 sw=2 et:
|