maintainer-feedback requested: [Bug 268018] textproc/py-sphinx: Updating to 5.3.0, ensuring themes are installed, using flit and pyproject-build
Bugzilla Automation has asked freebsd-python (Nobody) for maintainer-feedback: Bug 268018: textproc/py-sphinx: Updating to 5.3.0, ensuring themes are installed, using flit and pyproject-build https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268018 --- Description --- textproc/py-sphinx is presently available in a version 5.3.0. 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 concerns, such that might be encountered in any approach updating to 5.3.0 in py-sphinx; - 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 used to prepare the sources before building with distutils. The approach of using pyproject-build to prepare the sources was referenced partly on some tooling in the Debian dh-python[1] project. 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. 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 would be for a given set of extensions and other configuration selected onto pyproject.toml for the respective upstream build components (here, using flit, with no extensions in this project's pyproject.toml). Maybe other projects with a pyproject.toml and no setup.py could use a similar 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. 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 ports 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/bui ld/plugin_pyproject.py#L105
[Bug 268018] textproc/py-sphinx: Updating to 5.3.0, ensuring themes are installed, using flit and pyproject-build
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268018 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=238375&action=edit 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. 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 concerns, such that might be encountered in any approach updating to 5.3.0 in py-sphinx; - 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 used to prepare the sources before building with distutils. The approach of using pyproject-build to prepare the sources was referenced partly on some tooling in the Debian dh-python[1] project. 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. 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 would be for a given set of extensions and other configuration selected onto pyproject.toml for the respective upstream build components (here, using flit, with no extensions in this project's pyproject.toml). Maybe other projects with a pyproject.toml and no setup.py could use a similar 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. 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 ports 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 -- You are receiving this mail because: You are the assignee for the bug.
[Bug 268018] textproc/py-sphinx: Updating to 5.3.0, ensuring themes are installed, using flit and pyproject-build
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268018 Sean Champ changed: What|Removed |Added CC||lab+bsd@thinkum.space --- Comment #1 from Sean Champ --- Created a p[atch for devel/py-virtualenv to ensure the docs will build with the updated py-sphinx https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268016 Both of these patches have been tested with poudriere, albeit in a system undergoing some other py-port updates. -- You are receiving this mail because: You are the assignee for the bug.
Problem reports for python@FreeBSD.org that need special attention
To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status |Bug Id | Description +---+--- Open|205308 | devel/py-pip and devel/py-virtualenv don't aggree Open|240343 | x11-themes/plasma5-breeze-gtk: Fails to build if Open|242896 | lang/python*: Fail to package in poudriere (testp Open|257362 | lang/python3: Add link for python3-embed.pc where Open|258192 | devel/py-pyinstaller: Fails to run on 3.8+. Fix i Open|262759 | Python ports that install conflicting files in ge In Progress |255025 | textproc/py-chardet: Update to 4.0.0 Open|257353 | lang/python38: Intermittently fails to build unde New |267886 | math/py-numpy: Update to 1.23.5 Open|264993 | www/mitmproxy: Update to 9.0.0 Open|264426 | www/mitmproxy: Update to 8.0.0 (<=7.0.4 vulnerabl Open|234981 | graphics/py-wand: Add DOCS option Pass MAINTAINER Open|260448 | [NEW] devel/py-aiosignal: Project to manage callb Open|262109 | Mk/Uses/python.mk: Improve CMake/Python integrati Open|224115 | devel/py-babel directory name != port name In Progress |258195 | lang/python38: Update to 3.8.12 New |264992 | devel/py-click: Update to 8.1.3 17 problems total for which you should take action.
[Bug 268018] textproc/py-sphinx: Updating to 5.3.0, ensuring themes are installed, using flit and pyproject-build
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268018 Charlie Li changed: What|Removed |Added Flags|maintainer-feedback?(python |maintainer-feedback+ |@FreeBSD.org) | CC||vish...@freebsd.org Depends on||255722 --- Comment #2 from Charlie Li --- Please refer to the referenced bug and associated literature for PEP-517 stuff. Referenced Bugs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255722 [Bug 255722] [meta] Mk/Uses/python.mk: PEP-517 (pyproject.toml) Support -- You are receiving this mail because: You are the assignee for the bug.
[Bug 255722] [meta] Mk/Uses/python.mk: PEP-517 (pyproject.toml) Support
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255722 Charlie Li changed: What|Removed |Added Blocks||268018 Referenced Bugs: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268018 [Bug 268018] textproc/py-sphinx: Updating to 5.3.0, ensuring themes are installed, using flit and pyproject-build -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.
[Bug 268018] textproc/py-sphinx: Updating to 5.3.0, ensuring themes are installed, using flit and pyproject-build
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268018 --- Comment #3 from Sean Champ --- Ah, there's a Wiki page https://wiki.freebsd.org/Python/PEP-517 I'm quite new to the Python programming language lol. I don't believe every project uses flit in itself, from pyproject.toml? Some projects might prefer hatchling e.g, or using the conventional setuptools. For an more recent devel/py-jupyterlab (3.5.0) released more recently than what's in ports right now, there's also the following for instance: [build-system] requires=["jupyter_packaging>=0.9,<2"] build-backend = "jupyter_packaging.build_api" I believe I'd hoped it might be a sufficient hack, to just call setuptools instead. If there's a broader project for addressing PEP-517 though, I think that's good to see. Of course with textproc/py-sphinx if I was only using setuptools and only installing everything it compiled, then that may not be sufficient to ensure that the sphinx themes would be installed with the py-sphinx port - thus to the effect of present patch, to ensure that at least the basic sphinx theme is installed and available for direct application with sphinx or for reference and extension in other sphinx themes. Returning to the PEP-517 topic, after the recent devel/py-jupyterlab release, then after one local test build it seemed that building with jlpm in particular may result in drawing in a lot of NPM packages, with quite a large download in the build process. I believe that's what the distributors may be using in order to produce what we're seeing in the downloads from cheeseshop? Thus, perhaps what we've download from the cheeeshop master site may already have been partially processed - contrasted to building directly from GitHub sources, for instance With sphinx at least, I'd thought it might be a good precaution to filter it again with pyproject-build nonetheless, if not simply installing all the sources files from the distfile archive. My main goal with the patch was simply to ensure that the basic theme is installed, along with the rest of the sphinx components that show up after the filtering with the upstream project's preferred build tool. I think it's great if the more general concern about PEP-517 support is being addressed though -- You are receiving this mail because: You are the assignee for the bug.
[Bug 268018] textproc/py-sphinx: Updating to 5.3.0, ensuring themes are installed, using flit and pyproject-build
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268018 Sean Champ changed: What|Removed |Added Attachment #238375|0 |1 is obsolete|| --- Comment #4 from Sean Champ --- Created attachment 238385 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=238385&action=edit patch proposal for updating to Sphinx 5.3.0 (updated) This patch obsoletes the previous here, also updating the version runtime dependencies from sphinx pyproject.toml Before updating to sphinx 5.3.0, the textproc/py-pygments and textproc/py-docutils ports may need to be updated, to match the updated version requirements in Sphinx pyproject.toml -- You are receiving this mail because: You are the assignee for the bug.
[Bug 268018] textproc/py-sphinx: Updating to 5.3.0, ensuring themes are installed, using flit and pyproject-build
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268018 --- Comment #5 from Sean Champ --- Comment on attachment 238385 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=238385 patch proposal for updating to Sphinx 5.3.0 (updated) With this patch in its present state, the updated port would not install any bin scripts, thus not installing any sphinx-build script. This would represent a complete installation and it may break at least the devel/cmake-man build. However the consensus might go for PEP-517 support in ports, here was one proposal lol, after a glance at how Debian is approaching it such as in the dh-python tooling https://salsa.debian.org/python-team/tools/dh-python/ -- You are receiving this mail because: You are the assignee for the bug.
[Bug 268018] textproc/py-sphinx: Updating to 5.3.0, ensuring themes are installed, using flit and pyproject-build
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268018 --- Comment #6 from Sean Champ --- (In reply to Sean Champ from comment #5) would *not* represent a complete installation. Health, all -- You are receiving this mail because: You are the assignee for the bug.