diff options
| author | Alexander Golubev <fatzer2@gmail.com> | 2025-07-26 22:15:26 +0300 |
|---|---|---|
| committer | Fat-Zer <fatzer2@gmail.com> | 2025-07-30 17:43:10 +0000 |
| commit | b34a0cee632288778735458146a71d10f0c98072 (patch) | |
| tree | 647d0d4ae408cfc41dca38008edc92f2a247a074 /dev-python | |
| parent | 48e6813528dbbcaafca3043b624a924398ffac05 (diff) | |
| download | tde-packaging-gentoo-b34a0cee632288778735458146a71d10f0c98072.tar.gz tde-packaging-gentoo-b34a0cee632288778735458146a71d10f0c98072.zip | |
dev-python/pytdeextensions: fix FTBFS
Also fix a lot of other issues.
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'dev-python')
5 files changed, 184 insertions, 48 deletions
diff --git a/dev-python/pytdeextensions/files/pytdeextensions-14.1.2-Fix-FTBFS-caused-by-mkpath-returning-nothing.patch b/dev-python/pytdeextensions/files/pytdeextensions-14.1.2-Fix-FTBFS-caused-by-mkpath-returning-nothing.patch new file mode 100644 index 00000000..847da6ce --- /dev/null +++ b/dev-python/pytdeextensions/files/pytdeextensions-14.1.2-Fix-FTBFS-caused-by-mkpath-returning-nothing.patch @@ -0,0 +1,91 @@ +From ecdb0099bd14fc440a09219bd3df5672208c483c Mon Sep 17 00:00:00 2001 +From: Michele Calgaro <michele.calgaro@yahoo.it> +Date: Fri, 17 Jan 2025 21:39:35 +0900 +Subject: [PATCH 27/35] Fix FTBFS caused by 'mkpath' returning nothing + +Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> +--- + setup.py | 3 ++- + src/tdedistutils.py | 18 ++++++++++++------ + 2 files changed, 14 insertions(+), 7 deletions(-) + +diff --git a/setup.py b/setup.py +index fa41586..8690ffa 100755 +--- a/setup.py ++++ b/setup.py +@@ -318,6 +318,7 @@ class InstallLibpythonize(Command): + return self.outfiles + + def mkpath(self, name, mode=0o777): +- return dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ return name + + main() +diff --git a/src/tdedistutils.py b/src/tdedistutils.py +index e8cd35e..8487708 100644 +--- a/src/tdedistutils.py ++++ b/src/tdedistutils.py +@@ -373,7 +373,8 @@ class InstallApplicationDataAndLinks(install_data): + self.outfiles.extend( [item+'c' for item in self.outfiles if item.endswith('.py')] ) + + def mkpath(self, name, mode=0o777): +- return dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ return name + + ########################################################################### + class InstallExecutableLinks(Command): +@@ -415,7 +416,8 @@ class InstallExecutableLinks(Command): + return self.outfiles or [] + + def mkpath(self, name, mode=0o777): +- return dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ return name + + ########################################################################### + # Fix the --root option for the install_lib command. +@@ -1121,7 +1123,8 @@ class InstallKControlModule(Command): + return self.outfiles or [] + + def mkpath(self, name, mode=0o777): +- return dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ return name + + ########################################################################### + class BuildDocbookHTML(Command): +@@ -1240,7 +1243,8 @@ class InstallDocbookHTML(Command): + return self.outfiles or [] + + def mkpath(self, name, mode=0o777): +- return dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ return name + + ########################################################################### + class UpdateI18NMessages(Command): +@@ -1431,7 +1435,8 @@ class InstallI18NMessages(Command): + return self.outfiles + + def mkpath(self, name, mode=0o777): +- return dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ return name + + + ########################################################################### +@@ -2000,7 +2005,8 @@ class InstallTdeioslave(Command): + return self.outfiles or [] + + def mkpath(self, name, mode=0o777): +- return dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ dir_util.mkpath(name, mode, dry_run=self.dry_run) ++ return name + + ########################################################################### + class CheckPyTQt(Command): +-- +2.49.1 + diff --git a/dev-python/pytdeextensions/files/pytdeextensions-14.1.4-Avoid-byte-compiling-in-case-it-is-disabled.patch b/dev-python/pytdeextensions/files/pytdeextensions-14.1.4-Avoid-byte-compiling-in-case-it-is-disabled.patch new file mode 100644 index 00000000..562cd5c3 --- /dev/null +++ b/dev-python/pytdeextensions/files/pytdeextensions-14.1.4-Avoid-byte-compiling-in-case-it-is-disabled.patch @@ -0,0 +1,31 @@ +From 7f80ce875d688fc019b74a84508970b26c48a90b Mon Sep 17 00:00:00 2001 +From: Alexander Golubev <fatzer2@gmail.com> +Date: Sat, 26 Jul 2025 11:26:55 +0300 +Subject: [PATCH] Avoid byte-compiling in case it is disabled + +Signed-off-by: Alexander Golubev <fatzer2@gmail.com> +--- + src/tdedistutils.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/tdedistutils.py b/src/tdedistutils.py +index aade55e..e5c1e40 100644 +--- a/src/tdedistutils.py ++++ b/src/tdedistutils.py +@@ -365,9 +365,10 @@ class InstallApplicationDataAndLinks(install_data): + prefix = prefix + os.sep + self.outfiles.extend(compile_tqtdesigner(self.outfiles, force=1, prefix=prefix, base_dir=install_cmd.prefix, dry_run=self.dry_run)) + +- # Byte compile the .py files +- from distutils.util import byte_compile +- byte_compile(self.outfiles, optimize=0, force=1, prefix=prefix, base_dir=install_cmd.prefix, dry_run=self.dry_run) ++ if not sys.dont_write_bytecode: ++ # Byte compile the .py files (unless it is disabled) ++ from distutils.util import byte_compile ++ byte_compile(self.outfiles, optimize=0, force=1, prefix=prefix, base_dir=install_cmd.prefix, dry_run=self.dry_run) + + # Add the .pyc files to the list of outfiles. + self.outfiles.extend( [item+'c' for item in self.outfiles if item.endswith('.py')] ) +-- +2.49.1 + diff --git a/dev-python/pytdeextensions/pytdeextensions-14.1.2-r1.ebuild b/dev-python/pytdeextensions/pytdeextensions-14.1.2-r1.ebuild new file mode 100644 index 00000000..be346c87 --- /dev/null +++ b/dev-python/pytdeextensions/pytdeextensions-14.1.2-r1.ebuild @@ -0,0 +1,47 @@ +# Copyright 2024-2025 The Trinity Desktop Project +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +# We don't actually use autotools build, but it prevents cmake from beeing inherited +TRINITY_BUILD_ADMIN=yes +TRINITY_MODULE_TYPE="libraries" + +PYTHON_COMPAT=( python3_{8..13} ) +DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_EXT=1 +# Despite the package provides setup.py, it seems to be incompatible with DISTUTILS_USE_PEP517=setuptools +DISTUTILS_USE_PEP517=standalone + +inherit trinity-base-2 distutils-r1 + +DESCRIPTION="Python extensions for TDE" +HOMEPAGE="https://trinitydesktop.org/" +LICENSE="GPL-2" +SLOT="0" +if [[ ${PV} != *9999* ]] ; then + KEYWORDS="~amd64 ~arm64 ~x86" +fi +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +DEPEND="${PYTHON_DEPS} + ~dev-python/pytde-${PV}[${PYTHON_SINGLE_USEDEP}] +" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-Fix-FTBFS-caused-by-mkpath-returning-nothing.patch" + "${FILESDIR}/${PN}-14.1.4-Avoid-byte-compiling-in-case-it-is-disabled.patch" +) + +src_compile() { + esetup.py build build_libpythonize --clib="-lgcc_s" +} + +src_install() { + esetup.py install --root "$D" --skip-build + python_optimize + + # purge undesireables + rm -r "${D}/$(python_get_sitedir)"/*.egg-info || die +} diff --git a/dev-python/pytdeextensions/pytdeextensions-14.1.2.ebuild b/dev-python/pytdeextensions/pytdeextensions-14.1.2.ebuild deleted file mode 100644 index 080568d2..00000000 --- a/dev-python/pytdeextensions/pytdeextensions-14.1.2.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2024 The Trinity Desktop Project -# Distributed under the terms of the GNU General Public License v2 - -EAPI="8" - -TRINITY_MODULE_TYPE="libraries" -PYTHON_COMPAT=( python3_{8..13} ) -DISTUTILS_SINGLE_IMPL=1 -inherit trinity-base-2 distutils-r1 - -DESCRIPTION="Python extensions for TDE" -HOMEPAGE="https://trinitydesktop.org/" -LICENSE="GPL-2" -SLOT="0" -if [[ ${PV} != *9999* ]] ; then - KEYWORDS="~amd64 ~arm64 ~x86" -fi -IUSE="" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -DEPEND="${PYTHON_DEPS} - ~dev-python/pytde-${PV} -" -RDEPEND="${DEPEND}" - -TQBASE="/usr/tqt3" -TDEDIR="/usr/trinity/14" - -src_compile() { - local BUILD_DIR="${S}_${EPYTHON}" - esetup.py build_libpythonize - unset BUILD_DIR - distutils-r1_src_compile -} - -src_install() { - distutils-r1_src_install -} diff --git a/dev-python/pytdeextensions/pytdeextensions-9999.ebuild b/dev-python/pytdeextensions/pytdeextensions-9999.ebuild index a68539d6..f33d6750 100644 --- a/dev-python/pytdeextensions/pytdeextensions-9999.ebuild +++ b/dev-python/pytdeextensions/pytdeextensions-9999.ebuild @@ -1,11 +1,18 @@ -# Copyright 2024 The Trinity Desktop Project +# Copyright 2024-2025 The Trinity Desktop Project # Distributed under the terms of the GNU General Public License v2 EAPI="8" +# We don't actually use autotools build, but it prevents cmake from beeing inherited +TRINITY_BUILD_ADMIN=yes TRINITY_MODULE_TYPE="libraries" + PYTHON_COMPAT=( python3_{8..13} ) DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_EXT=1 +# Despite the package provides setup.py, it seems to be incompatible with DISTUTILS_USE_PEP517=setuptools +DISTUTILS_USE_PEP517=standalone + inherit trinity-base-2 distutils-r1 DESCRIPTION="Python extensions for TDE" @@ -15,23 +22,21 @@ SLOT="0" if [[ ${PV} != *9999* ]] ; then KEYWORDS="~amd64 ~arm64 ~x86" fi -IUSE="" REQUIRED_USE="${PYTHON_REQUIRED_USE}" DEPEND="${PYTHON_DEPS} - ~dev-python/pytde-${PV} + ~dev-python/pytde-${PV}[${PYTHON_SINGLE_USEDEP}] " RDEPEND="${DEPEND}" -TQBASE="/usr/tqt3" - src_compile() { - local BUILD_DIR="${S}_${EPYTHON}" - esetup.py build_libpythonize - unset BUILD_DIR - distutils-r1_src_compile + esetup.py build build_libpythonize --clib="-lgcc_s" } src_install() { - distutils-r1_src_install + esetup.py install --root "$D" --skip-build + python_optimize + + # purge undesireables + rm -r "${D}/$(python_get_sitedir)"/*.egg-info || die } |
