diff --git a/.github/workflows/PyNUTClient.yml b/.github/workflows/PyNUTClient.yml index f9e7cc026a..e438421bd0 100644 --- a/.github/workflows/PyNUTClient.yml +++ b/.github/workflows/PyNUTClient.yml @@ -56,6 +56,7 @@ jobs: mkdir src ; for F in *.py.in ; do sed -e "s,@PYTHON@,$(command -v python)," < "$F" > "src/`basename "$F" .in`" ; done ; cp README.adoc README.txt ; + cp ../../../LICENSE-GPL3 . ; chmod +x src/test*.py ; - name: Build a binary wheel run: >- diff --git a/scripts/python/module/.gitignore b/scripts/python/module/.gitignore index b31b911d12..6073a68036 100644 --- a/scripts/python/module/.gitignore +++ b/scripts/python/module/.gitignore @@ -7,3 +7,4 @@ /src /README.txt /.pypi-* +/LICENSE-GPL3 diff --git a/scripts/python/module/Makefile.am b/scripts/python/module/Makefile.am index d3352c7bc6..8e03eab6a2 100644 --- a/scripts/python/module/Makefile.am +++ b/scripts/python/module/Makefile.am @@ -17,7 +17,7 @@ $(GENERATED_DIST): .pypi-dist clean-local: rm -rf $(GENERATED_SRC) $(GENERATED_DIST) - rm -f .pypi-src .pypi-dist + rm -f .pypi-src .pypi-dist LICENSE-GPL3 MAINTAINERCLEANFILES = Makefile.in .dirstamp .pypi-tools* @@ -32,7 +32,7 @@ upload publish: esac # README.txt is also a part of module standard expectations -.pypi-src: test_nutclient.py.in PyNUT.py.in setup.py.in README.adoc Makefile +.pypi-src: test_nutclient.py.in PyNUT.py.in setup.py.in README.adoc Makefile $(top_srcdir)/LICENSE-GPL3 @echo " PYPI Generate PyPI module source" @rm -rf $(GENERATED_SRC) "$@" @mkdir src @@ -52,6 +52,7 @@ upload publish: if test -x "$(srcdir)/$${B}.in" ; then chmod +x "src/$${B}"; fi ; \ done ; \ cp -pf "$(srcdir)/README.adoc" README.txt || exit ; \ + cp -pf "$(top_srcdir)/LICENSE-GPL3" . || exit ; \ echo "from . import PyNUT" > src/__init__.py || exit @touch "$@" diff --git a/scripts/python/module/setup.py.in b/scripts/python/module/setup.py.in index 7d3acff7eb..d74184ae4f 100644 --- a/scripts/python/module/setup.py.in +++ b/scripts/python/module/setup.py.in @@ -15,18 +15,19 @@ with codecs.open(os.path.join(here, "README.txt"), encoding="utf-8") as fh: long_description = "\n" + fh.read() setup( - name="PyNUTClient", - version='@NUT_SOURCE_GITREV_NUMERIC@', - author="The Network UPS Tools project", - author_email="jimklimov+nut@gmail.com", - description="Python client bindings for NUT", - url = "https://github.com/networkupstools/nut/tree/master/scripts/python/module", - long_description_content_type="text/plain", # NOTE: No asciidoc so far, see https://packaging.python.org/en/latest/specifications/core-metadata/ - long_description=long_description, - packages=find_packages(), - install_requires=['telnetlib'], - keywords=['pypi', 'cicd', 'python'], - classifiers=[ + name = "PyNUTClient", + version = '@NUT_SOURCE_GITREV_NUMERIC@', + author = "The Network UPS Tools project", + license_files = ('LICENSE-GPL3',), + author_email = "jimklimov+nut@gmail.com", + description = "Python client bindings for NUT", + url = "https://github.com/networkupstools/nut/tree/master/scripts/python/module", + long_description_content_type = "text/plain", # NOTE: No asciidoc so far, see https://packaging.python.org/en/latest/specifications/core-metadata/ + long_description = long_description, + packages = find_packages(), + # install_requires = ['telnetlib'], # NOTE: telnetlib.py is part of Python core for tested 2.x and 3.x versions, not something 'pip' can download + keywords = ['pypi', 'cicd', 'python'], + classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Programming Language :: Python :: 2.6",