diff options
author | Mark Wagie | 2021-11-07 11:03:31 -0700 |
---|---|---|
committer | Mark Wagie | 2021-11-07 11:03:31 -0700 |
commit | e8a2434ecbb6088b71654dc84f91d31f4a95d38f (patch) | |
tree | bd4cdb63fbddda3283f1b24fba3840d8d2ceae08 | |
download | aur-e8a2434ecbb6088b71654dc84f91d31f4a95d38f.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | PyCXX.pc | 9 | ||||
-rw-r--r-- | python-pycxx-7-change-include-paths.patch | 28 |
5 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..421f15e1fe2b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = python-pycxx + pkgdesc = Write Python extensions in C++ + pkgver = 7.1.5 + pkgrel = 1 + url = http://cxx.sourceforge.net + arch = any + license = BSD + depends = python + source = https://downloads.sourceforge.net/cxx/pycxx-7.1.5.tar.gz + source = PyCXX.pc + source = python-pycxx-7-change-include-paths.patch + sha256sums = 9087a8574ac9caf631a8ec0b90e260828051e4bc89e1e44f4fc253ccc297d826 + sha256sums = a4597b98a7e110a18f08896f98fb12614f5c96a24642119db16672d7616f35a9 + sha256sums = 8ed381d9542265fcfbac2a50398edf49d44ac4fb59bf6b2455e45fa427fd7d42 + +pkgname = python-pycxx diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..2e31044c3d4e --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# Ignore everything +* + +# But not these files... +!.gitignore +!PKGBUILD +!.SRCINFO +!PyCXX.pc +!python-pycxx-7-change-include-paths.patch diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..55625b2309a1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com> +pkgname=python-pycxx +_name=${pkgname#python-} +pkgver=7.1.5 +pkgrel=1 +pkgdesc="Write Python extensions in C++" +arch=('any') +url="http://cxx.sourceforge.net" +license=('BSD') +depends=('python') +source=("https://downloads.sourceforge.net/cxx/$_name-$pkgver.tar.gz" + 'PyCXX.pc' + "$pkgname-7-change-include-paths.patch") +sha256sums=('9087a8574ac9caf631a8ec0b90e260828051e4bc89e1e44f4fc253ccc297d826' + 'a4597b98a7e110a18f08896f98fb12614f5c96a24642119db16672d7616f35a9' + '8ed381d9542265fcfbac2a50398edf49d44ac4fb59bf6b2455e45fa427fd7d42') + +prepare() { + cd "$_name-$pkgver" + patch -Np1 -i "$srcdir/$pkgname-7-change-include-paths.patch" +} + +build() { + cd "$_name-$pkgver" + python setup.py build +} + +check() { + export PKG_CONFIG_PATH="$srcdir":/usr/lib/pkgconfig + test "$(pkg-config --modversion PyCXX)" = "$pkgver" +} + +package() { + cd "$_name-$pkgver" + python setup.py install --root="$pkgdir" --optimize=1 --skip-build + + install -Dm644 "$srcdir/PyCXX.pc" -t "$pkgdir/usr/share/pkgconfig/" + install -Dm644 COPYRIGHT -t "$pkgdir/usr/share/licenses/$pkgname/" +} diff --git a/PyCXX.pc b/PyCXX.pc new file mode 100644 index 000000000000..d37c05345179 --- /dev/null +++ b/PyCXX.pc @@ -0,0 +1,9 @@ +prefix=/usr +exec_prefix=/usr +includedir=/usr/include +srcdir=/usr/share/python3.9/CXX + +Name: PyCXX +Description: Write Python extensions in C++ +Version: 7.1.5 +Cflags: -I${includedir} diff --git a/python-pycxx-7-change-include-paths.patch b/python-pycxx-7-change-include-paths.patch new file mode 100644 index 000000000000..4bb62d456706 --- /dev/null +++ b/python-pycxx-7-change-include-paths.patch @@ -0,0 +1,28 @@ +diff --git a/Src/cxxextensions.c b/Src/cxxextensions.c +index 28a8e1d..cfab556 100644 +--- a/Src/cxxextensions.c ++++ b/Src/cxxextensions.c +@@ -37,7 +37,7 @@ + #include "CXX/WrapPython.h" + + #if PY_MAJOR_VERSION == 2 +-#include "Src/Python2/cxxextensions.c" ++#include "Python2/cxxextensions.c" + #else +-#include "Src/Python3/cxxextensions.c" ++#include "Python3/cxxextensions.c" + #endif +diff --git a/Src/cxxsupport.cxx b/Src/cxxsupport.cxx +index 1f2fb43..946e60d 100644 +--- a/Src/cxxsupport.cxx ++++ b/Src/cxxsupport.cxx +@@ -37,7 +37,7 @@ + #include "CXX/WrapPython.h" + + #if PY_MAJOR_VERSION == 2 +-#include "Src/Python2/cxxsupport.cxx" ++#include "Python2/cxxsupport.cxx" + #else +-#include "Src/Python3/cxxsupport.cxx" ++#include "Python3/cxxsupport.cxx" + #endif |