public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: "Ricardo B. Marlière" <rbm@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4 2/5] doc: Add sphinx to requirements.txt
Date: Mon, 31 Mar 2025 19:53:42 +0200	[thread overview]
Message-ID: <20250331175342.GA276600@pevik> (raw)
In-Reply-To: <9be4b701-40b8-4ada-a7cb-ff8ab1931a7b@suse.com>

> On 3/31/25 18:37, Petr Vorel wrote:
> > Wait, one thing: we use doc/requirements.txt in .readthedocs.yml. Is it really a
> > good idea to add there sphinx, when it uses containers? I can test it in a
> > separate branch, but we discussed some time ago that we should avoid adding
> > sphinx for readthedocs.

> > Wouldn't be in the end better to keep 'pip install sphinx' in Makefile instead
> > (the previous proposal).

> > Kind regards,
> > Petr

> I forgot about it. Thanks for remembering. At the moment readthedocs
> installs sphinx via pip, so if we add just sphinx ro requirements.txt
> without version, pip should reinstall the same version which is already
> available before building the website.

> We should give a try and eventually get back to the old way.

To be honest I would prefer to avoid experimenting with readthedoc as much as
possible. How about just forcing 'pip install sphinx' only in Makefile?
It can be the simplest version - without checking if it's installed.

Because I don't see any benefit to add sphinx to readthedocs where it's not
needed - in the best case it will takes time to reinstall, in worst it just take
time to experiment to find it breaks things. We are going to diverge from
readthedocs anyway, unless we manually sync with the sphinx version it uses.
You asked for newest version (which is 8.2.3, if I don't count broken 8.3),
but in readthedocs we use old ubuntu-22.04, which uses sphinx 4.3.2 [1].

We could update to noble (24.04LTS) (if supported by readthedocs) to get newer
7.2.6 (as I can test it as a separate effort.

[1] https://packages.ubuntu.com/jammy/python3-sphinx
[2] https://packages.ubuntu.com/noble/python3-sphinx

I guess controlling the version is important, therefore I would prefer b) or c).

a) simple version in Makefile, without version:

$(VENV_DIR):
	$(PYTHON) -m virtualenv $(VENV_DIR)
	$(VENV_CMD) && pip install sphinx && pip install -r requirements.txt

b) simple version with specifying sphinx version:

SPHINX_VERSION := 8.2.3 # or 7.2.6 or 4.3.2?
...
$(VENV_DIR):
	$(PYTHON) -m virtualenv $(VENV_DIR)
	$(VENV_CMD) && pip install sphinx==$(SPHINX_VERSION) && pip install -r requirements.txt

c) more complicated version (you did not like) which install sphinx only when
needed:

SPHINX_VERSION := 8.2.3
INSTALL_SPHINX := $(shell $(PYTHON) -c "import sphinx" 2>/dev/null && echo ":" || echo "pip install sphinx==$(SPHINX_VERSION)")
...
$(VENV_DIR):
	$(PYTHON) -m virtualenv $(VENV_DIR)
	$(VENV_CMD) && pip install -r requirements.txt && $(INSTALL_SPHINX)

Kind regards,
Petr

> Andrea


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2025-03-31 17:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28  9:57 [LTP] [PATCH v4 0/5] Update doc related Makefile Petr Vorel
2025-03-28  9:57 ` [LTP] [PATCH v4 1/5] doc/Makefile: Remove also metadata/ltp.json Petr Vorel
2025-03-28  9:57 ` [LTP] [PATCH v4 2/5] doc: Add sphinx to requirements.txt Petr Vorel
2025-03-28 13:02   ` Andrea Cervesato via ltp
2025-03-31 16:31     ` Petr Vorel
2025-03-31 16:37       ` Petr Vorel
2025-03-31 17:04         ` Andrea Cervesato via ltp
2025-03-31 17:53           ` Petr Vorel [this message]
2025-04-01  8:18             ` Andrea Cervesato via ltp
2025-04-01 12:17               ` Petr Vorel
2025-04-01 12:20                 ` Petr Vorel
2025-03-28  9:57 ` [LTP] [PATCH v4 3/5] doc/Makefile: Allow to create and use .venv Petr Vorel
2025-03-28 13:05   ` Andrea Cervesato via ltp
2025-03-28  9:57 ` [LTP] [PATCH v4 4/5] Makefile: Update 'doc' target, add 'doc-clean' Petr Vorel
2025-03-28 11:36   ` Ricardo B. Marli��re via ltp
2025-04-07 14:53     ` Petr Vorel
2025-04-08 19:11       ` Ricardo B. Marli��re via ltp
2025-04-09  8:12         ` Petr Vorel
2025-04-09 12:22           ` Ricardo B. Marli��re via ltp
2025-04-09 13:22             ` Petr Vorel
2025-03-28  9:57 ` [LTP] [PATCH v4 5/5] doc: Note 'make doc' in the building doc Petr Vorel
2025-03-28 13:18 ` [LTP] [PATCH v4 0/5] Update doc related Makefile Andrea Cervesato via ltp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250331175342.GA276600@pevik \
    --to=pvorel@suse.cz \
    --cc=andrea.cervesato@suse.com \
    --cc=ltp@lists.linux.it \
    --cc=rbm@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox