summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 675aef14683b9090b9931fec4f00e3f70243865a (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
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

# Maintainer: Andres Alejandro Navarro Alsina <aanavarroa@unal.edu.co>
# Contributor: M. Jarvis 
pkgbase=python-coord-git
pkgname=('python-coord-git' 'python2-coord-git')
pkgver=v1.0.4.r15.328e54c
pkgrel=1
pkgdesc=" Coord is a Python module that provides basic functionality related to angles and celestial coordinatesw"
arch=('any')
url="https://github.com/LSSTDESC/Coord.git"
license=('BSD')
makedepends=('git' 'python' 'python-cffi' 'python-numpy' 'python-future' 'python2' 'python2-cffi' 'python2-numpy' 'python2-future' 'python-setuptools' 'python2-setuptools')
checkdepends=('python-nose' 'python2-nose' 'python-astropy' 'python2-astropy')
source=("${pkgbase}::git+${url}")
md5sums=('SKIP')

pkgver() {
  	 cd "${pkgbase}"
 	 printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

prepare() {
	  cp -a $pkgbase{,-py2}
}

build() {
	cd "$srcdir"/$pkgbase
	python setup.py build

	cd  "$srcdir"/$pkgbase-py2
	python2 setup.py build
}

check() {
	cd "$srcdir"/$pkgbase
	nosetests -v || warning 'Tests failed'

	cd "$srcdir"/$pkgbase-py2
	nosetests2 -v || warning 'Tests2 failed'
}

package_python-coord-git() {
	  		  depends=('glibc')
	  		  cd $pkgbase
	  		  python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
			  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
}

package_python2-coord-git() {
	  		  depends=('glibc')
	  		  cd $pkgbase-py2
			  python2 setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
			  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
}