diff --git a/NEWS.adoc b/NEWS.adoc index 410ad702ee..3d73a567e5 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -522,6 +522,11 @@ relocated into new `shutdown.default` INSTCMD definitions. [#2670] module in the build or execution environment (deprecated in Python 3.11, removed since Python 3.13). [#2183] + - the PyPI distribution of the `PyNUTClient` module tarball should now use a + lower-cased file name (and immediate versioned directory name inside) to + match the requirements of link:https://peps.python.org/pep-0625/[PEP-0625]. + The Python module name (and its directory) should remain camel-cased. [#2773] + - enabled installation of built single-file PDF and HTML (including man page renditions) under the configured `docdir`. It seems previously they were only built (if requested) but not installed via `make`, unlike the common diff --git a/UPGRADING.adoc b/UPGRADING.adoc index dfcfaca94a..254e29c178 100644 --- a/UPGRADING.adoc +++ b/UPGRADING.adoc @@ -57,6 +57,13 @@ Changes from 2.8.2 to 2.8.3 depending on `target_cpu` of the build. If you had any scripts relying on the older pattern, they may have to be updated. +- the PyPI distribution of the `PyNUTClient` module tarball should now use a + lower-cased file name (and immediate versioned directory name inside) to + match the requirements of link:https://peps.python.org/pep-0625/[PEP-0625]. + The Python module name (and its directory) should remain camel-cased. + OS distribution package recipes that deliver the module separately (e.g. + as part of Python ecosystem rather than NUT) may have to adjust. [#2773] + - Updated man page generation with `configure` script options to specify that manual sections on the target platform differ from (Linux-based) defaults hard-coded into page sources; this should allow to simplify NUT packaging diff --git a/scripts/python/module/Makefile.am b/scripts/python/module/Makefile.am index c9fc4a61e0..dde6fbae24 100644 --- a/scripts/python/module/Makefile.am +++ b/scripts/python/module/Makefile.am @@ -4,6 +4,10 @@ # Note: this Makefile is focused on PyPI publication # The usual autotools stuff including clean-up is in parent dir # (to allow easier mixing of the module and app, if/when desired) +# +# NOTE: Due to PEP-0625, the versioned tarball and directory names +# must be normalized to lower-case, as achieved by setup.py(.in). +# The module name remains camel-cased as it always was. # Non-maintainers can at most generate the source layout for python setuptools # (having only shell scripting as a prerequisite suffices for that) diff --git a/scripts/python/module/README.adoc b/scripts/python/module/README.adoc index 18b1d84ddd..613de9007f 100644 --- a/scripts/python/module/README.adoc +++ b/scripts/python/module/README.adoc @@ -25,6 +25,8 @@ of the original project, allowing to develop other classes nearby later. It is published to PyPI repository as link:https://pypi.org/project/PyNUTClient/[PyNUTClient] and so should be installable with `pip` tooling. +Note that the file name of the distribution tarball is lower-cased per +PEP-0625 requirements, while the module name is camel-cased historically. Currently the module is regularly tested to work with Python interpreter versions 2.7, 3.4, 3.5 and 3.7. diff --git a/scripts/python/module/setup.py.in b/scripts/python/module/setup.py.in index c6276fd2f2..5f7c20ec25 100644 --- a/scripts/python/module/setup.py.in +++ b/scripts/python/module/setup.py.in @@ -15,7 +15,7 @@ with codecs.open(os.path.join(here, "README.txt"), encoding="utf-8") as fh: long_description = "\n" + fh.read() setup( - name = "PyNUTClient", + name = "pynutclient", ### "PyNUTClient" lower-cased due to PEP-0625 version = '@NUT_SOURCE_GITREV_NUMERIC@', author = "The Network UPS Tools project", license_files = ('LICENSE-GPL3',),