[arch-commits] Commit in python-py3c/repos (2 files)

Felix Yan felixonmars at gemini.archlinux.org
Tue Nov 30 20:23:14 UTC 2021


    Date: Tuesday, November 30, 2021 @ 20:23:13
  Author: felixonmars
Revision: 1058163

archrelease: copy trunk to community-staging-any

Added:
  python-py3c/repos/community-staging-any/
  python-py3c/repos/community-staging-any/PKGBUILD
    (from rev 1058159, python-py3c/trunk/PKGBUILD)

----------+
 PKGBUILD |   41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

Copied: python-py3c/repos/community-staging-any/PKGBUILD (from rev 1058159, python-py3c/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2021-11-30 20:23:13 UTC (rev 1058163)
@@ -0,0 +1,41 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=python-py3c
+pkgver=1.3.1
+pkgrel=2
+pkgdesc="A Python 2/3 compatibility layer for C extensions"
+url="https://github.com/encukou/py3c"
+license=('MIT')
+arch=('any')
+depends=('python')
+makedepends=('python-setuptools')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/encukou/py3c/archive/v$pkgver.tar.gz")
+sha512sums=('ea8d283d619a18e8673a7d2e85d9f20b401913af2958c9aa1b31c1ebabdc0d5a6a51f2b6b0b561c3d962faeefbd1754ce576bfcfe32bc25073b6178f6eccec22')
+
+prepare() {
+  cd py3c-$pkgver
+  # Don't regenerate with broken path in "install" target
+  sed -i 's/install: py3c.pc/install:/' Makefile
+}
+
+build() {
+  cd py3c-$pkgver
+  python setup.py build
+  make prefix=/usr py3c.pc
+}
+
+check() {
+  cd py3c-$pkgver
+  make test-python
+}
+
+package() {
+  cd py3c-$pkgver
+  make prefix="$pkgdir"/usr install
+  python setup.py install --root="$pkgdir" --optimize=1
+
+  # Remove headers in broken location
+  rm -r "$pkgdir"/usr/include/python*
+
+  install -Dm644 LICENSE.MIT -t "$pkgdir"/usr/share/licenses/$pkgname/
+}



More information about the arch-commits mailing list