aboutsummaryrefslogblamecommitdiffstats
path: root/main/py-simplejson/APKBUILD
blob: 2040f6b7c28160521ef8a067388afa36abb2aae6 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                           
                                                   
                     
                   

             
                                                                  
                                             
          
             
                                                                   
                                                   
                                                                                                  
                                    

         
                      
                              
                              




                             
                             


           














                                        


                                                      
                                                                  
                                                                           

 
                                                                                                                                                                          
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-simplejson
_pkgname=simplejson
pkgver=3.17.0
pkgrel=0
pkgdesc="Simple, fast, extensible JSON encoder/decoder for Python"
url="https://pypi.python.org/pypi/simplejson"
arch="all"
license="MIT"
makedepends="py3-setuptools py2-setuptools python2-dev python3-dev"
subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3"
source="$pkgname-$pkgver.tar.gz::https://github.com/simplejson/simplejson/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	cd "$builddir"
	python2 setup.py build
	python3 setup.py build
}

check() {
	cd "$builddir"
	python2 setup.py test
	python3 setup.py test
}

package() {
	mkdir -p "$pkgdir"
}

_py2() {
	replaces="$pkgname"
	_py python2
}

_py3() {
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
	rm -Rf "$subpkgdir"/usr/lib/python*/site-packages/simplejson/tests/
}

sha512sums="3057edfa8c8a16fa1c2027a880ac71531afc70d087a12a6fa085b3e09705ab049850dbabe60acc6fc11f51d9e0cf98f58407be03980182dca2ca070c298fd023  py-simplejson-3.17.0.tar.gz"