Setuptools is not really deprecated, but it hasn't seen any meaningful 
development for quite some time now. Meson has also a few advantages (like 
automatic rebuild) that are nice to have.

So if you just want to find a quick solution for you problem, then just add 
the `#distutils` flag and move on. But if you have a couple of cython 
projects that you actively maintain, I would suggest to spend the hour and 
learn the basics of meson and then migrate those projects to pyproject.toml 
+ meson-python. Usually AI is able to automatically migrate most of the 
stuff.

Here are some pointers:
- https://mesonbuild.com/meson-python/tutorials/introduction.html (it's for 
compiling plain c-files, but cython is the same expect that you add 
`'cython'` in the project header as well, see 
https://github.com/dnicolodi/python-siphash24/blob/39d90380210a0f4795a65f3e173771798512c877/meson.build#L5)
- If you need pari as dependency, you can copy 
https://github.com/sagemath/cypari2/blob/main/meson.build#L40-L73

And of course, feel free to contact me if you encounter any issues.


On Tuesday, January 13, 2026 at 1:34:01 AM UTC+1 Nils Bruin wrote:

> On Monday, 12 January 2026 at 16:25:15 UTC-8 [email protected] wrote:
>
> another question is why does one need a direct interface to libpari in 
> cython code, instead of cypari2? 
>
>  
> I don't think I need that. I just need to be able to access some `Gen` 
> objects from a pari data structure efficiently. I didn't ask for the 
> pari_err symbol. But yet, the cython generated code wants to link it in. 
> And the symbol resolved fine before (although probably in a bit underlinked 
> situation). With some (recent? post 10.4?) changes, that's no longer the 
> case. In fact, cypari2 may be the problem: how is setuptools able to derive 
> from the cimport of cypari that libpari.so needs to be linked in as well? 
> The distutils directive seems to do the trick, though, and that's a very 
> minor change.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/630ac9ba-1bab-43ec-8f02-61e06ee56128n%40googlegroups.com.

Reply via email to