[arch-commits] Commit in python-cffi/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Fri Feb 12 14:40:33 UTC 2021
Date: Friday, February 12, 2021 @ 14:40:33
Author: felixonmars
Revision: 407880
archrelease: copy trunk to community-x86_64
Added:
python-cffi/repos/community-x86_64/
python-cffi/repos/community-x86_64/PKGBUILD
(from rev 407879, python-cffi/trunk/PKGBUILD)
----------+
PKGBUILD | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
Copied: python-cffi/repos/community-x86_64/PKGBUILD (from rev 407879, python-cffi/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2021-02-12 14:40:33 UTC (rev 407880)
@@ -0,0 +1,59 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: lilydjwg <lilydjwg at gmail.com>
+
+pkgbase=python-cffi
+pkgname=(python-cffi python2-cffi)
+pkgver=1.14.5
+pkgrel=1
+pkgdesc="Foreign Function Interface for Python calling C code"
+arch=('x86_64')
+url="https://cffi.readthedocs.org/"
+license=('MIT')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pycparser' 'python2-pycparser')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner')
+source=("https://foss.heptapod.net/pypy/cffi/-/archive/v$pkgver/cffi-v$pkgver.tar.bz2")
+sha512sums=('0e2e739e44507898d713c0e2c20f2e2eee3c468fd14b3adc9d7acf69d8bc0172993790d5178e637bcc454d1e62cc680b9c3cade05965eb25dc6cd22ffef924ce')
+
+prepare() {
+ cp -a cffi-v$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/cffi-v$pkgver
+ python setup.py build
+
+ cd "$srcdir"/cffi-v$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/cffi-v$pkgver
+ python setup.py pytest
+
+ cd "$srcdir"/cffi-v$pkgver-py2
+ python2 setup.py pytest
+}
+
+package_python-cffi() {
+ depends=('python-pycparser')
+
+ cd cffi-v$pkgver
+
+ # remove files created during check() for reproducible SOURCES.txt
+ rm -rf testing/cffi{0,1}/__pycache__/
+
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-cffi() {
+ depends=('python2-pycparser')
+
+ cd cffi-v$pkgver-py2
+
+ # remove files created during check() for reproducible SOURCES.txt
+ rm -rf testing/cffi{0,1}/__pycache__/
+
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
More information about the arch-commits
mailing list