commit: cb34db8c6f877b1239ed40e1bd423561c55cd2c2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sat May 27 05:21:24 2023 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sat May 27 05:32:52 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb34db8c
dev-python/pyzmq: Use PEP517 build Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> .../pyzmq/files/pyzmq-25.1.0-build_ext.patch | 50 ++++++++++++++++++++++ dev-python/pyzmq/pyzmq-25.1.0.ebuild | 7 ++- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/dev-python/pyzmq/files/pyzmq-25.1.0-build_ext.patch b/dev-python/pyzmq/files/pyzmq-25.1.0-build_ext.patch new file mode 100644 index 000000000000..491ae6b23ea4 --- /dev/null +++ b/dev-python/pyzmq/files/pyzmq-25.1.0-build_ext.patch @@ -0,0 +1,50 @@ +From 24d65e10bee5b68751dc36e2ee7e6d6ed35751e5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]> +Date: Sat, 27 May 2023 07:11:24 +0200 +Subject: [PATCH] =?UTF-8?q?Call=20distutils'=20finalize=5Foptions()=20earl?= + =?UTF-8?q?y=20to=20fix=20build=5Fext=20-j=E2=80=A6?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Call the `finalize_options()` method of overridden distutils commands +before running the `configure` command, in order to fix errors due +to unconfigured `--jobs` option. This can be reproduced by running: + + $ python setup.py build_ext -j12 + […] + error: '<' not supported between instances of 'str' and 'int' + + Fatal: Falling back on bundled libzmq, but config has explicitly prohibited building the libzmq extension. +--- + setup.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index c52723d1..a4f8b4e3 100755 +--- a/setup.py ++++ b/setup.py +@@ -1107,9 +1107,9 @@ class CheckingBuildExt(build_ext): + patch_lib_paths(ext_path, self.compiler.library_dirs) + + def finalize_options(self): ++ super().finalize_options() + # check version, to prevent confusing undefined constant errors + self.distribution.run_command("configure") +- return super().finalize_options() + + + class ConstantsCommand(Command): +@@ -1258,8 +1258,8 @@ else: + patch_lib_paths(ext_path, self.compiler.library_dirs) + + def finalize_options(self): ++ super().finalize_options() + self.distribution.run_command("configure") +- return super().finalize_options() + + cmdclass["cython"] = CythonCommand + cmdclass["build_ext"] = zbuild_ext +-- +2.40.1 + diff --git a/dev-python/pyzmq/pyzmq-25.1.0.ebuild b/dev-python/pyzmq/pyzmq-25.1.0.ebuild index 6041abf2a4db..2c1cdd0b2335 100644 --- a/dev-python/pyzmq/pyzmq-25.1.0.ebuild +++ b/dev-python/pyzmq/pyzmq-25.1.0.ebuild @@ -6,7 +6,7 @@ EAPI=8 DISTUTILS_EXT=1 # TODO: Find out exactly where this error comes from # error: '<' not supported between instances of 'str' and 'int' -#DISTUTILS_USE_PEP517=setuptools +DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{10..11} ) PYTHON_REQ_USE="threads(+)" @@ -52,6 +52,9 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-23.2.0-libdir.patch + # fix build_ext -j... invocation used by PEP517 build + # https://github.com/zeromq/pyzmq/pull/1872 + "${FILESDIR}"/${P}-build_ext.patch ) EPYTEST_DESELECT=( @@ -88,6 +91,6 @@ python_prepare_all() { } python_test() { - cd "${BUILD_DIR}/lib" || die + cd "${BUILD_DIR}/install$(python_get_sitedir)" || die epytest -p no:flaky }
