testing/py3-sphinxcontrib-gist: fix build

This commit is contained in:
ptrcnull 2023-02-27 00:39:28 +01:00 committed by alice
parent 0f3ae7ace8
commit acce699e8d
2 changed files with 26 additions and 2 deletions

View File

@ -10,7 +10,9 @@ arch="noarch"
license="LGPL-3.0-only"
depends="python3 py3-sphinx"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
fix-build.patch
"
builddir="$srcdir"/$_pkgname-$pkgver
replaces="py-sphinxcontrib-gist" # Backwards compatibility
@ -24,4 +26,7 @@ package() {
python3 setup.py install --skip-build --root="$pkgdir"
}
sha512sums="a6bc8bae2bf64c5201452134c075c6336ab1928c534bb6d274c3fdda555609ad58e02d11d4c9d78528be39578c759394016c58ef6f0bad1ffc38328e3cf3ca00 sphinxcontrib.gist-0.1.0.tar.gz"
sha512sums="
a6bc8bae2bf64c5201452134c075c6336ab1928c534bb6d274c3fdda555609ad58e02d11d4c9d78528be39578c759394016c58ef6f0bad1ffc38328e3cf3ca00 sphinxcontrib.gist-0.1.0.tar.gz
e1bbfac6dc5d6b9dd4b8c2a3ec1d4b790cafb89e69640ca7a9da041d27d20388d973ba8529bafd098dce9b2f5029ad7b219af5414a59bd557744964eeac050e1 fix-build.patch
"

View File

@ -0,0 +1,19 @@
a bit of an ugly hack to import the module properly
`from sphinxcontrib ...` doesn't work, because sphinxcontrib is defined by
all the other py3-sphinxcontrib-* packages that use (now depreacated) declare_namespace
as a namespace residing in sitedir, thus python doesn't see the local directory
diff --git a/setup.py b/setup.py
index b0bf058..e43693e 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,8 @@
#-*- coding:utf-8 -*-
+import sys
+del sys.modules['sphinxcontrib']
+
import setuptools
from sphinxcontrib import gist as pkg