Not sure how to title the subject because I am not familiar with Sage's build
system at all, but hope the body explains what it means.

===========

Usually, I build Sage with `./bootstrap && ./configure && make build`, but I
believe the same problem below happens for conda install as well (the setuptools
part should be the same.) In the build log / output, there's occasionally these
lines:

[*] building 'sage.schemes.hyperelliptic_curves.hypellfrob' extension
... (The $CC ... commands)
[*] building 'sage.rings.polynomial.polynomial_modn_dense_ntl' extension
[*] building 'sage.schemes.elliptic_curves.descent_two_isogeny' extension
[*] building 'sage.schemes.elliptic_curves.mod_sym_num' extension
[*] building 'sage.schemes.hyperelliptic_curves.hypellfrob' extension
[*] building 'sage.schemes.elliptic_curves.period_lattice_region' extension
[*] building 'sage.schemes.toric.divisor_class' extension
[*] building 'sage.rings.polynomial.polynomial_modn_dense_ntl' extension

([*] is [spkg-install]) But the issue for the user / developer is that this
doesn't show what is the progress of the build, i.e. how many extensions has
been built and how many are there left. Another annoyance would be lines such as

dependency <path> won't ... included in the manifest: the path must be relative

These are annoying mainly because running `make build` from an already built
directory still prints 9054 of these, so it would be nice to mute them, or at
least have the option to mute them.

I think I can set the logging level to be > INFO (how do I do that? Is there an
environment variable? I can't find it in the Sage docs,) but then I also lose
other logging.info informations.

============

I traced down where these are printed. In two places:

https://github.com/pypa/setuptools/blob/main/setuptools/command/build_ext.py#L289-L294
https://github.com/pypa/setuptools/blob/main/setuptools/_distutils/command/build_ext.py#L530-L535

So (from what I know) there are two options if we want to mute these lines:

- I submit a PR to setuptools directly
  -> but I doubt they would think the above reasoning is sufficient for a change
- Alternatively, I believe that Sage builds a Python from source currently, or
at least that's what I believe, since I see a path
`/home/grhkm/git/sage/local/var/lib/sage/venv-python3.12/lib/python3.12/site-packages/setuptools/...`
which contains the setuptools package used for building. Is it possible to apply
a patch to the setuptools, similar to other .patch files I see in `build/...`?
If so, where should I put the patch file?

Even if this is a bad idea, I hope someone can answer the "where should I put
the patch file" question, I think it will help me understand the Sage build
system a lot better.

Thanks in advance!

Gareth

-- 
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 visit 
https://groups.google.com/d/msgid/sage-devel/ab451ac4-8b12-4ea0-9211-e85f5ee31a9c%40gmail.com.

Reply via email to