You'll need sage.misc.package_dir.cython_namespace_package_support
On Sunday, October 29, 2023 at 5:00:08 PM UTC-7 Edgar Costa wrote: > Hello, > > Cythonizing a package, via setuptools, that uses a `from sage.foo cimport > bar` seems to no longer work with Sage 10.2.beta8 > > Here is a minimal example: > sage -pip install git+https://github.com/edgarcosta/pyfib.git@main > > here is the error log: > https://gist.github.com/edgarcosta/a0a189839c9053c30a33f60435431957 > > Note, that one can also try to install the package without the `from > sage.rings.integer cimport Integer`, via > sage -pip install git+https://github.com/edgarcosta/pyfib.git@nosage > and then everything works as expected. > > I believe this has something to do with PEP-420 and the recent upgrade to > Cython3.0 > > https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html#namespace-packages > > Furthermore, by looking at commits like this one > > https://github.com/sagemath/sage/pull/36110/commits/cb78fd95b03678f821bc575c683feb74f860105c > it gives me the idea that there is something to do with relative imports, > but I am not sure. > > Any insight would be appreciated, as all my Cython pip installable > packages fail exactly the same way. > > Cheers, > Edgar > > -- 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 sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/80033da2-a3dd-4aa9-b52d-f0272ab5c5cbn%40googlegroups.com.