Bug 268016 - devel/py-virtualenv: Updating docs build for newer sphinx
Summary: devel/py-virtualenv: Updating docs build for newer sphinx
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nicola Vitale
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-27 17:25 UTC by Sean Champ
Modified: 2022-11-28 10:12 UTC (History)
0 users

See Also:
nivit: maintainer-feedback+


Attachments
devel/py-virtualenv: using -m sphinx for docs build (796 bytes, patch)
2022-11-27 17:25 UTC, Sean Champ
no flags Details | Diff
patch to use directly sphinx-build command (1.35 KB, patch)
2022-11-27 21:32 UTC, Nicola Vitale
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Champ 2022-11-27 17:25:12 UTC
Created attachment 238373 [details]
devel/py-virtualenv: using -m sphinx for docs build

When trying to build the documentation for the recently updated devel/py-virtualenv port, I was noticing an error about a missing build_sphinx command. 

This was with a ports tree in a state of some local updates, including an update for textproc/py-sphinx, which is now available at a release 5.3.0

I'm guessing that the local build failure may have been correlated to the local sphinx update.

With the attached patch, the docs build works out, even with this perhaps uncommon local config.

This patch basically just uses `-m sphinx` directly for the docs build, with output to a new .build_docs dir under wrkdir. The .build_docs dir is then used as the origin dir for the copytree cmd.
Comment 1 Sean Champ 2022-11-27 18:31:33 UTC
created a patch for updating py-sphinx, such that something like this patch might be needed if py-sphinx is updated
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268018
Comment 2 Nicola Vitale freebsd_committer freebsd_triage 2022-11-27 21:32:33 UTC
Created attachment 238379 [details]
patch to use directly sphinx-build command

It seems fine to me, but why not use the sphinx-build command directly?
We could also build/install a manpage at this point...
Comment 3 Sean Champ 2022-11-27 23:02:23 UTC
(In reply to Nicola Vitale from comment #2)

Thanks for mentioning sphinx-build. I don't know if I've reached that part of the Intro to Python book yet, lol, it looks succinct though.

Health, all
Comment 4 Nicola Vitale freebsd_committer freebsd_triage 2022-11-28 08:50:29 UTC
(In reply to Sean Champ from comment #3)

It's the very same thing, only more succint as you said.
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-11-28 10:07:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f5c0096b9f28798d8a7e469b380d521413746511

commit f5c0096b9f28798d8a7e469b380d521413746511
Author:     Nicola Vitale <nivit@FreeBSD.org>
AuthorDate: 2022-11-28 10:03:43 +0000
Commit:     Nicola Vitale <nivit@FreeBSD.org>
CommitDate: 2022-11-28 10:03:43 +0000

    devel/py-virtualenv: Don't use sphinx_build command

    - In the next versions of devel/sphinx "The ``build_sphinx`` sub-command for
      setup.py is marked as deprecated to follow the policy of setuptools team".
      So prepare the port, and use the executable bin/sphinx-build directly. [1]

      Refs:

      https://github.com/sphinx-doc/sphinx/blob/0663602bb95e650975d95b5b87f5f26189b9b27c/sphinx/setup_command.py#L144
      https://github.com/sphinx-doc/sphinx/commit/0663602bb95e650975d95b5b87f5f26189b9b27c
      https://github.com/sphinx-doc/sphinx/issues/9595

    - Add a manpage to the documentation
    - Bump PORTREVISION (pkg-plist changed)

    PR:     268016
    Reported by:    Sean Champ <lab+bsd@thinkum.space> [1]

 devel/py-virtualenv/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Comment 6 Nicola Vitale freebsd_committer freebsd_triage 2022-11-28 10:12:29 UTC
Fixed. Thank you for the PR!