Conversation
tobiasdiez
left a comment
There was a problem hiding this comment.
A few comments concerning the meson file.
successfully finished, though This is Then I ran |
Version numbers of packages are hardcoded in pkgs/*/VERSION.txt and are update by a commit done by the release manager |
|
Interesting. I have wanted some of this for the documentation in sage-on-gentoo for some time. This branch lets me creates sdist for just the doc instead of having to checkout the whole tree or tarball. I guess I can figure out how to properly build from the sdist with just the |
|
This also failed |
Thanks for testing! This one should be fixed by 12264c0 |
|
Makes perfect sense (no pun intended), I should have thought it was the case. |
@kwankyu In this run, it is trying to install sagemath-standard from scratch, and that is failing somehow. Hard to see why without more output. Try if |
|
I am just looking at sage-doc-html right now, but I am guessing it will be the same with pdf, the sdist includes |
|
Should be fixed in 62b706c (not tested) |
Appears to have done the job, thanks. Building sage-doc-html, single threaded... started 20mn ago. |
Failed with same error Full log: |
|
@kwankyu is sage_setup installed under |
In |
|
It should work for me in sage-on-gentoo though. I will try. |
I have now successfully build a sage-doc-html wheel with |
|
This PR works for me except sdist. It seems my system is exceptional. I leave review decision to others. |
|
Does the sdist work if you install it from within |
|
I get |
|
How about |
|
|
Add |
|
|
One more switch: |
|
It seems working. Now pending at |
|
For html doc, I got but for pdf doc, I got |
|
Hmm... that's not good |
|
Can't reproduce this failure. Do you have any environment variables set that influence the docbuild? |
|
No. Like what? I will try again, since I was running doc_html and doc_pdf builds together. |
…ing pypa/build for now
… create symlinks into build dir
… create symlinks into build dir (fixup)
We create pip-installable packages that provide the Sage documentation. This is a step toward #29868, which has the full design.
We want to install the HTML documentation in
share/doc/sage/html. So we need a build system that supports such "non-package data".wheel.shared-datahttps://hatch.pypa.io/latest/plugins/builder/wheel/#configuration; example: https://github.com/jupyter/nbconvert/blob/main/pyproject.toml#L93C27-L93C44; dynamic data: How should one programmatically generated `shared-data`? pypa/hatch#528{datadir}https://meson-python.readthedocs.io/en/latest/reference/limitations.html#non-package-data-files; status of editable wheels to be checked.For synergy with #34630, we use meson-python - with a trivial
pkgs/sagemath-doc-html/meson.buildfile that just runsmakewith the existing Makefile.The actual build happens using ninja.
In the current implementation:
SAGE_EDITABLEis set toyes(default), this usespip install -e, which does the incremental docbuild (inpkgs/sagemath-doc-*/build) and creates symlinks in$SAGE_LOCAL/share/doc/sage/that point there.SAGE_WHEELSis set toyes, this builds a wheel from scratch, which contains the HTML documentation as non-package data files. IfSAGE_EDITABLEis not set, then it installs the wheel using--prefix=$SAGE_LOCALso that the HTML documentation appears in the familiar location.We do the same with PDF in sagemath-doc-pdf.
GH Actions workflows:
dist.ymlThe workflow (run on release tags) builds the sdists and uploads them to PyPI, along with the other pip-installable packages.
doc-build.ymlbuilds the live doc (HTML + PDF) by going through the wheels and uploads to PyPI if the credentials are present.To test:
make sagemath_doc_htmlandmake sagemath_doc_pdfshould continue to workmake SAGE_WHEELS=yes sagemath_doc_htmlandmake SAGE_WHEELS=yes sagemath_doc_pdfshould both work and create (architecture-independent) wheels inprefix/var/lib/sage/wheels/make sagemath_doc_html-sdistandmake sagemath_doc_pdf-sdistshould both create.tar.gzfiles inupstream/./sage -sh -c 'python3 -m build --no-isolation --skip-dependency-check --wheel .'SAGE_ROOT/src/doc; and building should not touchprefix/share/docat all. The documentation source comes from the sdist, and building the wheel should only write to a temporary directory, from which it creates the wheel.In follow-up PRs:
_staticare in the HTML wheel (because wheels cannot store symlinks); this could be fixed by WSL: Chrome on Windows does not find the_staticstyle in built HTML doc #35538 (comment). Using compression (thanks to meson-python >= 0.15), we are at 85 MB.src/doc. This duplication could be reduced by introducing more distributions as originally proposed in pip-installable packages sagemath-doc-src, sagemath-doc-inventory, sagemath-doc-html, sagemath-doc-pdf #29868.📝 Checklist
⌛ Dependencies
setup.py bdist_wheeland direct uses ofpython3 -m build#38201