Skip to contentSkip to conversation

doc: fix documentation build with latest setuptools

PATCH In review Andrea Cervesato 4 participants 7 messages Feb 11 – Feb 12

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: fix documentation build with latest setuptools

From: Andrea Cervesato <[email protected]>

Force setuptools to version 81.0.0, which is the last one where linuxdoc still can be installed. Also, from python 3.12 setuptools is not available anymore when creating a new virtualenv, so we need to force its installation to ensure that documentation will be built.

---
 doc/requirements.txt | 2 ++
 1 file changed, 2 insertions(+)
doc/requirements.txt +2 -0
index ed9e31601da3e0bd3b88c1cf682a68f22da0f9cd..dba3baeba5aedb81f420a8f13134af8dba2d553d 100644
@@ -5,3 +5,5 @@ sphinx-rtd-theme==2.0.0
 
 linuxdoc==20240924
 sphinxcontrib-spelling==7.7.0
+
+setuptools==81.0.0

---
base-commit: f9c96b60dfcc227bc7b3052d666540a7d84d949a
change-id: 20260211-fix_doc_build-10809d8f63d7

Best regards,

Signature · 5 lines
Andrea Cervesato <[email protected]>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Acked-by on v1 1/1
#1 lore raw

Hi!

Quoted 4 lines

Force setuptools to version 81.0.0, which is the last one where linuxdoc still can be installed. Also, from python 3.12 setuptools is not available anymore when creating a new virtualenv, so we need to force its installation to ensure that documentation will be built.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
Reviewed-by
#2 lore raw

Hi Andrea,

Quoted 5 lines

Hi!

Quoted 4 lines

Force setuptools to version 81.0.0, which is the last one where linuxdoc still can be installed. Also, from python 3.12 setuptools is not available anymore when creating a new virtualenv, so we need to force its installation to ensure that documentation will be built.

+1, higher setuptools version is probably better as it's still working on the oldest distros (than 68 version I added in my patchset). IMHO it'd be good to add (before merge) a comment to requirements.txt that it's just a temporary workaround (once linuxdoc is released I'd upgrade it and remove the dependency).

Kind regards,
Petr

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw
Quoted 10 lines · Petr Vorel

Hi Andrea,

Quoted 5 lines

Hi!

Quoted 4 lines

Force setuptools to version 81.0.0, which is the last one where linuxdoc still can be installed. Also, from python 3.12 setuptools is not available anymore when creating a new virtualenv, so we need to force its installation to ensure that documentation will be built.

Quoted 7 lines

+1, higher setuptools version is probably better as it's still working on the oldest distros (than 68 version I added in my patchset). IMHO it'd be good to add (before merge) a comment to requirements.txt that it's just a temporary workaround (once linuxdoc is released I'd upgrade it and remove the dependency).

Kind regards,
Petr

It's not a workaround, we need it because python 3.12 removed it from virtualenv. It explained in the git commit message in my patch.

Signature · 7 lines
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#4 lore raw
Quoted 16 lines · Petr Vorel
Quoted 14 lines

Hi Andrea,

Quoted 5 lines

Hi!

Quoted 4 lines

Force setuptools to version 81.0.0, which is the last one where linuxdoc still can be installed. Also, from python 3.12 setuptools is not available anymore when creating a new virtualenv, so we need to force its installation to ensure that documentation will be built.

+1, higher setuptools version is probably better as it's still working on the oldest distros (than 68 version I added in my patchset). IMHO it'd be good to add (before merge) a comment to requirements.txt that it's just a temporary workaround (once linuxdoc is released I'd upgrade it and remove the dependency).

Quoted 5 lines
Quoted 2 lines

Kind regards,
Petr

It's not a workaround, we need it because python 3.12 removed it from virtualenv. It explained in the git commit message in my patch.

It is a workaround in a sense because new linuxdoc master thanks to my fix [1] will not need setuptools any more (which I explained in my patch). Normally we would update, but upstream does not have time to release.

Also, new release will use hatch, we'll need to use pyproject.toml instead of requirements.txt.

Kind regards,
Petr

[1] https://github.com/return42/linuxdoc/commit/19f5e5cbe8fec100d9135cfb7d3f183fa9dc0642
[2] https://hatch.pypa.io/latest/

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#5 lore raw
Quoted 1 line

It is a workaround in a sense because new linuxdoc master thanks to my fix [1]

Now it's more clear, thanks for fixing it!

Quoted 5 lines

will not need setuptools any more (which I explained in my patch). Normally we would update, but upstream does not have time to release.

Also, new release will use hatch, we'll need to use pyproject.toml instead of requirements.txt.

Isn't pyproject.toml used specifically for python projects? I'm not sure about our LTP documentation setup which is just a sphinx configuration.

Signature · 7 lines
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
#6 lore raw

Hi Andrea,

Quoted 4 lines
Quoted 1 line

It is a workaround in a sense because new linuxdoc master thanks to my fix [1]

Now it's more clear, thanks for fixing it!

Quoted 8 lines
Quoted 5 lines

will not need setuptools any more (which I explained in my patch). Normally we would update, but upstream does not have time to release.

Also, new release will use hatch, we'll need to use pyproject.toml instead of requirements.txt.

Isn't pyproject.toml used specifically for python projects? I'm not sure about our LTP documentation setup which is just a sphinx configuration.

Likely, my python fu is very limited.

Anyway, because CI started to fail and also our real doc started to fail (Feb 11 and 12) [1] I agreed with Andrea to merge the fix. I dared to add a comment that it's workaround.

Kind regards,
Petr

[1] https://app.readthedocs.org/projects/linux-test-project/builds/?version__slug=latest

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp