summaryrefslogtreecommitdiff
path: root/dev-python/cypari2/files/cypari2-2.1.4-regen-bindings-for-each-python.patch
blob: cb9ba55fdd2983f2901de1a6e55bfe3c5d7c426d (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
Ensure that the file auto_paridecl.pxd is both (re)generated with and
installed for each python implementation.

From 248d26e3e6b1c02fdd3391f033e29d7012189d9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey@gmail.com>
Date: Tue, 28 Apr 2020 09:42:39 +1200
Subject: [PATCH] move rebuild out of build_ext so it is run before everything

---
 setup.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index 099ed3b..473fe12 100755
--- a/setup.py
+++ b/setup.py
@@ -13,6 +13,10 @@ from autogen.paths import include_dirs, library_dirs
 
 ext_kwds = dict(include_dirs=include_dirs(), library_dirs=library_dirs())
 
+# Generate auto-generated sources from pari.desc
+# This needs to be done before build/build_ext so the generated pxd is moved
+# to the build directory and installed with newer setuptools.
+rebuild()
 
 if "READTHEDOCS" in os.environ:
     # When building with readthedocs, disable optimizations to decrease
@@ -29,9 +33,6 @@ if "READTHEDOCS" in os.environ:
 # Adapted from Cython's new_build_ext
 class build_ext(_build_ext):
     def finalize_options(self):
-        # Generate auto-generated sources from pari.desc
-        rebuild()
-
         self.directives = {
             "autotestdict.cdef": True,
             "binding": True,
-- 
2.26.2