summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3c4bf722e3ef8c34ea66eac99c61f4df707a4a02 (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
# Maintainer: Andres Alejandro Navarro Alsina <aanavarroa@unal.edu.co>
# Contributor: Matias Carrasco Kind

pkgbase=python-easyaccess-git
pkgname=('python-easyaccess-git' 'python2-easyaccess-git')
pkgver=1.4.7.r1.318357f
pkgrel=1
pkgdesc=" Enhanced command line SQL interpreter client for astronomical databases"
arch=('any')
url="https://github.com/mgckind/easyaccess.git"
license=('GPL')
makedepends=('git' 'python' 'python2' 'python-cx_oracle-git' 'python2-cx_oracle-git' 'python-pandas' 'python-future' 'python2-pandas' 'python2-future' 'python-requests' 'python2-requests' 'python-fitsio-git'  'python2-fitsio-git')
checkdepends=('python-nose' 'python2-nose')
source=("${pkgbase}::git+${url}")
md5sums=('SKIP')

pkgver() {
  	 cd $pkgbase
	 printf "%s" "$(git describe --long | 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/tests
#	nosetests -v  || warning 'Tests failed'
#
#	cd "$srcdir"/$pkgbase-py2/tests
#	nosetests2 -v || warning 'Tests failed'
#}

package_python-easyaccess-git() {
				depends=('python-cx_oracle-git' 'python-pandas' 'python-future' 'python-requests' 'python-fitsio-git')
				cd $pkgbase
				python setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
				install -Dm644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE

}

package_python2-easyaccess-git() {
				 depends=('python2-cx_oracle-git' 'python2-pandas' 'python2-future' 'python2-requests' 'python2-fitsio-git')
			    	 cd $pkgbase-py2
			    	 python2 setup.py install --root=${pkgdir} --prefix=/usr --optimize=1
				 mv "$pkgdir"/usr/bin/easyaccess{,2} 
	  		    	 install -Dm644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE

}