From f80c880327ee1a60c2517aec8d80b48d80b80ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= Date: Thu, 15 Aug 2024 09:06:35 +1200 Subject: [PATCH] move generation of pari bindings sources out of build_ext --- setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index c1775b5..5051c6b 100755 --- a/setup.py +++ b/setup.py @@ -12,6 +12,10 @@ 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 @@ -28,9 +32,6 @@ # 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,