Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Nov 2022 18:25:22 +0000
From:      bugzilla-noreply@freebsd.org
To:        python@FreeBSD.org
Subject:   [Bug 268018] textproc/py-sphinx: Updating to 5.3.0, ensuring themes are installed, using flit and pyproject-build
Message-ID:  <bug-268018-21822@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268018

            Bug ID: 268018
           Summary: textproc/py-sphinx: Updating to 5.3.0, ensuring themes
                    are installed, using flit and pyproject-build
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: python@FreeBSD.org
          Reporter: lab+bsd@thinkum.space
             Flags: maintainer-feedback?(python@FreeBSD.org)
          Assignee: python@FreeBSD.org

Created attachment 238375
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D238375&action=
=3Dedit
py-sphinx update to 5.3.0 using the new py build system

textproc/py-sphinx is presently available in a version 5.3.0.=20

An update for py-sphinx may be of interest when updating some ports that use
sphinx, e.g devel/py-nbclassic (if updating to 0.4.8) and devel/py-pip (if
updating to 22.3.1)

The attached diff introduces one approach to addressing the following conce=
rns,
such that might be encountered in any approach updating to 5.3.0 in py-sphi=
nx;
- Sphinx 5.3.0 uses PEP 517 conventions for the build.
- This newer build system pyrpoject.toml, rather than a setup.py
- via pyproject.toml, the upstream build then uses flit when preparing the
sources for distribution. (Contextually, this mayu be for distributions with
sdist and/or wheel archives, such that may then be published to intermediate
repositories such as PyPI)
- Using upstream conventions, the version in this updated build would be
derived from Git changelog information. This changelog information is not
available in the tar bundle downloaded from cheeseshop


In the approached presented with this patch, pyproject-build and flit are u=
sed
to prepare the sources before building with distutils.=20

The approach of using pyproject-build to prepare the sources was referenced
partly on some tooling in the Debian dh-python[1] project.=20

The distutils part of the build is referenced on the existing known-good
approaches used in FreeBSD ports.

To work around the concern about the dynamic versioning with the upstream
pyproject.toml, a new patch is introduced, along with a post-patch call to
inject a version string to pyproject.toml.=20

This version string is then available for distutils, without further
modification on the upstream sources - e.g if there was a setup.cfg ensuring
setuptools_scm would be used directly. There isn't in this project, but it
seems it was used anyway.

In this approach - mainly, in using pyproject-build and flit to prepare the
sources before building with distutils - the package will be installed with=
 all
source files, as filtered through flit, in addition to pyc files. This woul=
d be
for a given set of extensions and other configuration selected onto
pyproject.toml for the respective upstream build components (here, using fl=
it,
with no extensions in this project's pyproject.toml).=20

Maybe other projects with a pyproject.toml and no setup.py could use a simi=
lar
approach, however possibly further refined.

For this port, this approach has the effect that the sphinx themes and other
non-py sphinx resources will be installed along with the pkg.=20

Thus, the basic sphinx theme and other sphinx themes will then be available
with the updated port.

The 'basic' theme itself may be required for the docs part of some other
py-port builds - at least, after an update in each. This may include any po=
rts
using the textproc/py-sphinx-basic-ng them and thus transitively,
textproc/py-sphinx_rtd_theme

[1]
https://salsa.debian.org/python-team/tools/dh-python/-/blob/master/dhpython=
/build/plugin_pyproject.py#L105

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268018-21822>