Package: src:knot Severity: wishlist Version: 2.7.4-1 Control: tags -1 upstream Control: forwarded -1 https://gitlab.labs.nic.cz/knot/knot-dns/issues/622 X-Debbugs-Cc: daniel.salz...@nic.cz
It would be great to package up the python libknot package for use in debian. The source for the package is already in the knot packaging, but it's missing setup.py and any automated tooling to create the PKG-INFO or .egg-info files found in the tarballs at http://pypi.python.org/pypi/libknot , which would be needed to make dh_python3 happy. upstream likes this idea (see id:cfe5149776cdb18f9c64e3c353c49...@nic.cz on knot-dns-us...@lists.nic.cz (https://lists.nic.cz/pipermail/knot-dns-users/2018-October/001514.html), but i think this would be even more useful if this stuff was prepped adequately upstream (see the upstream bug report i've opened, linked above). I suspect the attached patch, which aims to generate setup.py from the correct version number is a good start, but then it should probably also generate the additional files (PKG-INFO, libknot.egg-info/*, etc) as well (maybe upstream could even automate the uploads to pypi during release time). I think that once setup.py exists, the other stuff can be generated with something like: python3 setup.py egg_info but i don't know the preferred workflow or how you'd want to integrate it into the existing build/release process upstream. I'm cc'ing the upstream maintainer here, hopefully he'll have some good ideas. --dkg
From 9fb2b324269af6eb1fe66e4f135611776d39b10c Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor <d...@fifthhorseman.net> Date: Fri, 2 Nov 2018 11:26:09 -0400 Subject: [PATCH] python: auto-generate versioned python module setup.py --- configure.ac | 3 ++- python/Makefile.am | 1 + python/setup.py.in | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 python/setup.py.in diff --git a/configure.ac b/configure.ac index 86092089f..ef7e571b4 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,8 @@ AC_SUBST([KNOT_VERSION_PATCH], knot_VERSION_PATCH) AC_CONFIG_FILES([src/libknot/version.h src/libdnssec/version.h - src/libzscanner/version.h]) + src/libzscanner/version.h + python/setup.py]) # Automatically update release date based on NEWS AC_PROG_SED diff --git a/python/Makefile.am b/python/Makefile.am index 2c03a5bb7..eef878d71 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -1,5 +1,6 @@ EXTRA_DIST = \ libknot/__init__.py \ libknot/control.py \ + setup.py \ stats_http.py \ stats_influxdb.py diff --git a/python/setup.py.in b/python/setup.py.in new file mode 100644 index 000000000..d005e2975 --- /dev/null +++ b/python/setup.py.in @@ -0,0 +1,32 @@ +""" +libknot setup module. +""" + +from setuptools import setup, find_packages + +setup( + name='libknot', + version='@PACKAGE_VERSION@', + description='Python bindings for libknot', + url='https://github.com/CZ-NIC/knot', + author='Andre Keller', + author_email='andre.kel...@vshn.ch', + license='GPL-3.0', + + # See https://pypi.python.org/pypi?%3Aaction=list_classifiers + classifiers=[ + 'Development Status :: 3 - Alpha', + 'Intended Audience :: Developers', + 'Topic :: Software Development :: Build Tools', + 'License :: OSI Approved :: BSD License', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + ], + + packages=[ + 'libknot', + ] +) -- 2.19.1
signature.asc
Description: PGP signature