Skip to content

Commit

Permalink
multiple: fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
noptrix committed Sep 1, 2023
1 parent c521cb9 commit 187e1d7
Show file tree
Hide file tree
Showing 20 changed files with 350 additions and 125 deletions.
21 changes: 16 additions & 5 deletions packages/python-scikit-image/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,40 @@
# See COPYING for license details.

pkgname=python-scikit-image
_pkgname=scikit-image
_pkgname=scikit_image
pkgver=0.21.0
pkgrel=2
pkgrel=1
pkgdesc='Image processing routines for SciPy.'
arch=('x86_64' 'aarch64')
url='https://pypi.org/project/scikit-image/#files'
license=('BSD')
depends=('python' 'python-numpy' 'python-scipy' 'python-matplotlib'
'python-numpy' 'python-networkx' 'python-pillow' 'python-imageio'
'python-pywavelets')
makedepends=('python-setuptools' 'python-pip' 'python-wheel' 'python-numpy')
makedepends=('python-pip' 'python-build' 'python-wheel' 'python-numpy')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('3be52c341e68c951440885a810f3a2b52cafa1243701c192e3e9ade6bd248e7036ee5ea9ca26dbd754e3d9938ead7862e13e0155164c878a0de164c58a567bae')

build() {
cd "$_pkgname-$pkgver"

python setup.py build
python -m build --wheel --outdir="$startdir/dist"
}

package() {
cd "$_pkgname-$pkgver"

python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
$_pkgname
}

25 changes: 18 additions & 7 deletions packages/python-scruffy/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,39 @@
# See COPYING for license details.

pkgname=python-scruffy
_pkgname=scruffy
pkgver=0.3
pkgrel=9
pkgrel=8
epoch=1
pkgdesc='A framework for taking care of a bunch of boilerplate in Python apps.'
url='https://pypi.org/project/scruffy/#files'
arch=('any')
license=('MIT')
depends=('python' 'python-yaml' 'python-six' 'graphviz' 'plotutils')
makedepends=('python-setuptools' 'graphviz' 'plotutils')
makedepends=('python-pip' 'python-build' 'python-wheel' 'graphviz' 'plotutils')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/scruffy-$pkgver.tar.gz")
sha512sums=('7f3f955bddc0fe295147aca98391bc0159b469a719e44891f89592321af2f0e3eaf44bdd2ff43dd749440e7f7fa5587f3b8ff2828d7ac23bf066820e00446317')

build() {
cd "scruffy-$pkgver"
cd "$_pkgname-$pkgver"

python setup.py build
python -m build --wheel --outdir="$startdir/dist"
}

package() {
cd "scruffy-$pkgver"
cd "$_pkgname-$pkgver"

python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
--skip-build
pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
$_pkgname
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
From a9c9e69ed89b481b7361d9aa4c1acbbd50e13e22 Mon Sep 17 00:00:00 2001
From: LingMan <[email protected]>
Date: Wed, 10 May 2023 20:53:10 +0200
Subject: [PATCH] Fix compilation against Python 3.11+

With Python 3.11 the internal structure of PyFrameObject (AKA struct _frame) has been removed from
the public API.
De jure it was always an opaque struct but now there have also been de facto changes.

From the sip side the change is simply to call the official PyFrame_GetBack API, but PyFrameObject
is returned as part of sip's API. Callers of `sip_api_get_frame` may thus need additional fixes if
they rely on PyFrameObject's internal structure.

This change contains a fallback implementation of PyFrame_GetBack for Python 3.8 and older
(including 2.7) as documented here:
https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-c-api-porting
---
siplib/siplib.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/siplib/siplib.c b/siplib/siplib.c
index db52b68..b234a0b 100644
--- a/siplib/siplib.c
+++ b/siplib/siplib.c
@@ -13737,6 +13737,13 @@ static int sip_api_is_user_type(const sipWrapperType *wt)
return wt->wt_user_type;
}

+#if PY_VERSION_HEX < 0x030900B1
+static inline PyFrameObject* PyFrame_GetBack(PyFrameObject *frame)
+{
+ Py_XINCREF(frame->f_back);
+ return frame->f_back;
+}
+#endif

/*
* Return a frame from the execution stack.
@@ -13747,7 +13754,7 @@ static struct _frame *sip_api_get_frame(int depth)

while (frame != NULL && depth > 0)
{
- frame = frame->f_back;
+ frame = PyFrame_GetBack(frame);
--depth;
}

--
2.40.1

15 changes: 10 additions & 5 deletions packages/python-sip-pyqt4/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@

pkgbase=python-sip-pyqt4
pkgname=('python-sip-pyqt4' 'python2-sip-pyqt4')
pkgver=4.19.24
pkgrel=4
arch=('x86_64')
pkgver=4.19.25
pkgrel=1
arch=('x86_64' 'aarch64')
url='http://www.riverbankcomputing.com/software/sip/intro'
license=('custom:"sip"')
makedepends=('python' 'python2')
source=("https://www.riverbankcomputing.com/static/Downloads/sip/$pkgver/sip-$pkgver.tar.gz")
sha256sums=('edcd3790bb01938191eef0f6117de0bf56d1136626c0ddb678f3a558d62e41e5')
source=("https://www.riverbankcomputing.com/static/Downloads/sip/$pkgver/sip-$pkgver.tar.gz"
'0001-Fix-compilation-against-Python-3.11.patch')
sha512sums=('60fb4133c68869bf0993144978b4847d94a0f9c7b477f64a346ea133cfe35bc11820204ab327dcf9a929b6f65a26d16cc7efbce65e49967c3347b39376e57001'
'5cc5fe8e5e5169a183f848623989ca7b5dc7a766fa2fc7b71dd3657e9fdb6986ac1e9de3b2c4ff3b4ed500a522b4b88f8fa2aaac33002ee6b7e607aca9c695de')

prepare() {
mkdir -p build-pyqt4{,-py2}

cd "sip-$pkgver"
patch --strip=1 --input=../0001-Fix-compilation-against-Python-3.11.patch
}

build() {
Expand Down
23 changes: 17 additions & 6 deletions packages/python-spacy/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkgname=python-spacy
_pkgname=spacy
pkgver=3.6.1
pkgrel=2
pkgrel=1
pkgdesc='Industrial-strength Natural Language Processing (NLP) in Python.'
arch=('x86_64' 'aarch64')
url='https://pypi.org/project/spacy/#files'
Expand All @@ -13,19 +13,30 @@ depends=('python-catalogue' 'python-cymem' 'python-jinja' 'python-murmurhash'
'python-numpy' 'python-pathlib' 'python-plac' 'python-preshed'
'python-regex' 'python-requests' 'python-srsly' 'python-thinc'
'python-tqdm' 'python-typer' 'python-ujson' 'python-wasabi')
makedepends=('python-pip' 'python-wheel' 'cython' 'python-setuptools')
makedepends=('python-pip' 'python-build' 'python-wheel' 'cython')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('d3f609ab1192a2186153fba119a1882eb50a33bf1860d960f5fe42de8f80e9376fe2a619a533ac5ccf47c5b1c2c27a2e5a2052967c7173c13636392994560d7e')

build() {
cd "$_pkgname-$pkgver"
cd "$_pkgname-$pkgver"

python setup.py build
python -m build --wheel --outdir="$startdir/dist"
}

package() {
cd "$_pkgname-$pkgver"
cd "$_pkgname-$pkgver"

python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
$_pkgname
}

6 changes: 3 additions & 3 deletions packages/python-speechrecognition/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
pkgbase=python-speechrecognition
pkgname=('python2-speechrecognition' 'python-speechrecognition')
_pkgname=speech_recognition
pkgver=3.9.0
pkgrel=3
pkgver=3.8.1
pkgrel=9
pkgdesc='Library for performing speech recognition, with support for several engines and APIs, online and offline.'
arch=('any')
url='https://pypi.org/project/speechrecognition/#files'
license=('BSD')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://github.com/Uberi/speech_recognition/archive/$pkgver.tar.gz")
sha512sums=('de4f6b9d341f013e34ff67a65b459ac4895b8e8ac3682affdcb7f9c8dfd035ae26c821bb39966a0921c4b65e73ffcbbf2f8787f99568405f59ff61540e890729')
sha512sums=('555a4e7b2f0cb4f7adac8a0d7f1bc4071564a021a40b5ae75ea61e4b6a3b17b974672f0350ef06150bfa1711307e4af24603c8fc78aaf8a51fc82e73413815ac')

prepare() {
cp -a "$_pkgname-$pkgver"{,-2}
Expand Down
27 changes: 19 additions & 8 deletions packages/python-spoofmac/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,38 @@
# See COPYING for license details.

pkgname=python-spoofmac
_pkgname=SpoofMAC
pkgver=2.1.1
pkgrel=7
pkgrel=6
pkgdesc='Easily spoof your MAC address in OS X, Windows & Linux.'
url='https://pypi.org/project/SpoofMC/#files'
arch=('any')
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/SpoofMAC-$pkgver.tar.gz")
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('c283b0e65e6d8521180f8bf08f98048a53811f100416091232c1f5b75d944e084624c7244d6df1c73c5e1ba0f214e6518b7e930a8f9fb19dedcff5950655425e')

build() {
cd "SpoofMAC-$pkgver"
cd "$_pkgname-$pkgver"

python setup.py build
python -m build --wheel --outdir="$startdir/dist"
}

package() {
cd "SpoofMAC-$pkgver"
cd "$_pkgname-$pkgver"

python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
--skip-build
pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
$_pkgname
}

27 changes: 19 additions & 8 deletions packages/python-stringdist/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,38 @@
# See COPYING for license details.

pkgname=python-stringdist
_pkgname=StringDist
pkgver=1.0.9
pkgrel=6
pkgrel=5
pkgdesc='Several functions for calculating string distances.'
arch=('any')
url='https://pypi.org/project/StringDist/#files'
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/StringDist-1.0.9.tar.gz")
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('8220409586c96590728a2706948d4c169cc84724c1dd74e98923362e433191201bb407c3efb43160de9227a21b68e16eea90f49e47e7ea32f2a08a34622561d7')

build() {
cd "StringDist-$pkgver"
cd "$_pkgname-$pkgver"

python setup.py build
python -m build --wheel --outdir="$startdir/dist"
}

package() {
cd "StringDist-$pkgver"
cd "$_pkgname-$pkgver"

python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
--skip-build
pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
$_pkgname
}

31 changes: 25 additions & 6 deletions packages/python-textract/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,46 @@
pkgname=python-textract
_pkgname=textract
pkgver=1.6.5
pkgrel=3
pkgrel=2
pkgdesc='Extract text from any document. no muss. no fuss.'
url='https://pypi.org/project/textract/#files'
arch=('any')
license=('MIT')
depends=('python' 'python-argcomplete' 'python-beautifulsoup4' 'python-chardet'
'python-docx2txt' 'python-ebooklib' 'python-python-pptx' 'python-six'
'python-speechrecognition' 'python-xlrd')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('409b0f9a2c0560b7e49ce0bb004bdd16e4590d05db66cc99d9cdfb761a2f13248aa70bd55bdd280fae5401f0162e2d7f464f8e871e85f51de527687f0c9b2412')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
'setup.py.patch')
sha512sums=('409b0f9a2c0560b7e49ce0bb004bdd16e4590d05db66cc99d9cdfb761a2f13248aa70bd55bdd280fae5401f0162e2d7f464f8e871e85f51de527687f0c9b2412'
'8c9552f82ae70033e015c7244f78035b460e244c91f56346c32b4aa8ec01dfeb1294a8e670437cd607930d1db0a955003fd2977e7d434d20c8c7c4889d56f6e9')

prepare() {
cd "$_pkgname-$pkgver"

patch -p0 < ../setup.py.patch
}

build() {
cd "$_pkgname-$pkgver"

python setup.py build
python -m build --wheel --outdir="$startdir/dist"
}

package() {
cd "$_pkgname-$pkgver"

python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
pip install \
--verbose \
--disable-pip-version-check \
--no-warn-script-location \
--ignore-installed \
--no-compile \
--no-deps \
--root="$pkgdir" \
--prefix=/usr \
--no-index \
--find-links="file://$startdir/dist" \
$_pkgname
}

10 changes: 10 additions & 0 deletions packages/python-textract/setup.py.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- src/textract-1.6.5/setup.py 2022-03-10 11:30:08.000000000 +0100
+++ setup.py 2023-09-01 18:42:50.963331708 +0200
@@ -55,7 +55,6 @@
'textract',
'textract.parsers',
],
- install_requires=dependencies,
extras_require={
"pocketsphinx": ["pocketsphinx==0.1.15"]
},
Loading

0 comments on commit 187e1d7

Please sign in to comment.