On Thursday, March 11, 2021 at 1:28:12 PM UTC-8 François Bissey wrote:

> > On 12/03/2021, at 09:46, Matthias Koeppe <matthia...@gmail.com> wrote: 
> >  you get this type of build isolation for free if you make the 
> documentation a separate distribution according to PEP 517 
> (pyproject.toml), for which you declare the package as a build-system 
> requirement. 
>
> I have been wondering for a while why you want to have those kinds of 
> requirements. 
> In the autotools world there is no issues with building documentation as 
> part of the 
> building process even if, potentially like sage, you want some content to 
> be dynamically 
> generated by executing the just built package. 
>

Well, autotools does not even have a mechanism to advertise 
dependencies/requirements -- other than "configure" exiting with an error 
if they are not satisfied. You as a downstream package maintainer declare 
and update the requirements based on (in the best case) package 
documentation.
 

> And that’s when it hits me. In a lot of python packages, building the 
> documentation, 
> when it is available, a different build system is used than when you where 
> building the package itself.
> In a typical case, you build with distutils/setuptools and then invoke 
> make to start 
> sphinx to build the doc. [...] since you often use a completely different 
> way of building stuff, 
> those PEPs literally mandate a separate package.


Yes, pretty much. In the past (pre PEP-517/518) one could get away with 
treating docbuild etc. as something depending on "optional dependencies", 
like using Sphinx if Sphinx happens to be installed. This is no longer a 
thing in the much more structured modern Python build system world. One 
gains reproducible builds and overall (hopefully) more robustness.

And then -- of course likely not relevant for gentoo -- there is also the 
distinction between source and binary distributions (wheels): For the 
package itself, many users have a good reason to build it from source; but 
for a separate documentation package, most users do not really benefit from 
building it from source - they can as well install a prebuilt wheel 
providing the documentation. These users will then not have a need to 
install Sphinx at all.


-- 
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/d815d855-0cb6-4aba-9f84-d1f0db1c39f1n%40googlegroups.com.

Reply via email to