archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-py3c / trunk / PKGBUILD
blob7cfdd57abdbc391025a12712ce45767f469761a5
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-py3c
4 pkgver=1.4
5 pkgrel=2
6 pkgdesc="A Python 2/3 compatibility layer for C extensions"
7 url="https://github.com/encukou/py3c"
8 license=('MIT')
9 arch=('any')
10 depends=('python')
11 makedepends=('python-setuptools')
12 source=("$pkgname-$pkgver.tar.gz::https://github.com/encukou/py3c/archive/v$pkgver.tar.gz")
13 sha512sums=('db71db2c19a16ba5a430b676beb357faee5b67b161478932af13dd06be23b5505da85dbaf5b2447f95590fea55b833ee33fa19d3350ba3117f3364a9ab012ee6')
15 prepare() {
16   cd py3c-$pkgver
17   # Don't regenerate with broken path in "install" target
18   sed -i 's/install: py3c.pc/install:/' Makefile
21 build() {
22   cd py3c-$pkgver
23   python setup.py build
24   make prefix=/usr py3c.pc
27 check() {
28   cd py3c-$pkgver
29   make test-python
32 package() {
33   cd py3c-$pkgver
34   make prefix="$pkgdir"/usr install
35   python setup.py install --root="$pkgdir" --optimize=1
37   # Remove headers in broken location
38   rm -r "$pkgdir"/usr/include/python*
40   install -Dm644 LICENSE.MIT -t "$pkgdir"/usr/share/licenses/$pkgname/