git » libreoffice-still.git » commit 122dd82

Remove hardcoded python version strings

author Andreas Radke
2023-01-15 20:47:56 UTC
committer Andreas Radke
2023-01-15 20:47:56 UTC
parent 976ffd8f039abb03f31eade7ac612f0fdccb1267

Remove hardcoded python version strings

PKGBUILD +7 -5

diff --git a/PKGBUILD b/PKGBUILD
index 0edf1ae..70b392c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ pkgrel=2
 arch=('x86_64')
 license=('LGPL3')
 url="https://www.libreoffice.org/"
-makedepends=('curl>=7.20.0' 'hunspell>=1.2.8' 'python>=3.7' 'libwpd>=0.9.2' 'libwps'
+makedepends=('curl>=7.20.0' 'hunspell>=1.2.8' 'python' 'libwpd>=0.9.2' 'libwps'
 	'neon>=0.28.6' 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl' 'dbus-glib'
 	'libxslt' 'redland' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'graphite' 'icu' 
 	'lcms2' 'poppler>=0.24.0' 'libvisio' 'libetonyek' 'libodfgen' 'libcdr'
@@ -277,7 +277,7 @@ package_libreoffice-still-sdk() {
 
 package_libreoffice-still() {
 	pkgdesc="LibreOffice maintenance branch"
-	depends=('curl>=7.20.0' 'hunspell>=1.2.8' 'python>=3.7' 'libwpd>=0.9.2' 'libwps'
+	depends=('curl>=7.20.0' 'hunspell>=1.2.8' 'python' 'libwpd>=0.9.2' 'libwps'
 		'neon>=0.28.6' 'pango' 'nspr' 'libjpeg' 'libxrandr' 'libgl'
 		'libxslt' 'redland' 'hyphen' 'lpsolve' 'gcc-libs' 'sh' 'graphite' 'icu' 
 		'lcms2' 'poppler>=0.24.0' 'libvisio' 'libetonyek' 'libodfgen' 'libcdr'
@@ -332,11 +332,13 @@ package_libreoffice-still() {
 	install -m644 "${srcdir}"/libreoffice-still.{sh,csh} "${pkgdir}"/etc/profile.d/
 
 	# make pyuno find its modules
-	install -dm755 "${pkgdir}"/usr/lib/python3.10/site-packages
+        local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+
+	install -dm755 "${pkgdir}"/$site_packages
 	ln -svf /usr/lib/libreoffice/program/uno.py \
-		"${pkgdir}"/usr/lib/python3.10/site-packages/uno.py
+		"${pkgdir}"/$site_packages/uno.py
 	ln -svf /usr/lib/libreoffice/program/unohelper.py \
-		"${pkgdir}"/usr/lib/python3.10/site-packages/unohelper.py
+		"${pkgdir}"/$site_packages/unohelper.py
 		
 	# add a symlink required for gnome-documents; FS#51887
 	# https://lists.freedesktop.org/archives/libreoffice/2016-March/073787.html