Skip to content

Commit

Permalink
scripts/python/module, docs: adjust PyNUTClient tarball name to PEP-0…
Browse files Browse the repository at this point in the history
…625 requirements [#2773]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jan 19, 2025
1 parent 80c4bac commit ef693fa
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions UPGRADING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions scripts/python/module/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions scripts/python/module/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion scripts/python/module/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -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',),
Expand Down

0 comments on commit ef693fa

Please sign in to comment.