summaryrefslogtreecommitdiff
path: root/dev-python/pyzmq/files/pyzmq-25.1.0-build_ext.patch
blob: 491ae6b23ea44da5a5f425d0923e2ae7123b0859 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 24d65e10bee5b68751dc36e2ee7e6d6ed35751e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
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