diff mbox series

[v2,23/24] package/python-kmod: new package

Message ID 20231105202555.359391-23-adam.duskett@amarulasolutions.com
State Accepted
Headers show
Series [v2,01/24] package/python3: use upstream build system to disable berkeleydb module | expand

Commit Message

Adam Duskett Nov. 5, 2023, 8:25 p.m. UTC
This package is currently used in Fedora39 to provide python bindings for kmod,
and it is Python 3.12.0 compatible.

Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
v1 -> v2: Add this package

 DEVELOPERS                           |  1 +
 package/Config.in                    |  1 +
 package/python-kmod/Config.in        | 12 ++++++++++++
 package/python-kmod/python-kmod.hash |  3 +++
 package/python-kmod/python-kmod.mk   | 16 ++++++++++++++++
 5 files changed, 33 insertions(+)
 create mode 100644 package/python-kmod/Config.in
 create mode 100644 package/python-kmod/python-kmod.hash
 create mode 100644 package/python-kmod/python-kmod.mk

Comments

Yann E. MORIN Nov. 9, 2023, 9:35 p.m. UTC | #1
Adam, All,

On 2023-11-05 13:25 -0700, Adam Duskett spake thusly:
> This package is currently used in Fedora39 to provide python bindings for kmod,
> and it is Python 3.12.0 compatible.
> 
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> ---
[--SNIP--]
> diff --git a/package/python-kmod/python-kmod.mk b/package/python-kmod/python-kmod.mk
> new file mode 100644
> index 0000000000..12df0fa413
> --- /dev/null
> +++ b/package/python-kmod/python-kmod.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# python-kmod
> +#
> +################################################################################
> +
> +# The python-kmod package listed at https://pypi.org/project/kmod/#description
> +# is not the same as the one listed below.
> +PYTHON_KMOD_VERSION = 0.9.2
> +PYTHON_KMOD_SITE = $(call github,maurizio-lombardi,python-kmod,v$(PYTHON_KMOD_VERSION))
> +PYTHON_KMOD_SETUP_TYPE = setuptools
> +PYTHON_KMOD_LICENSE = LGPL-2.1+

I missed that, but it is not LGPL-2.1+ (aka -or-later). It is just
LGPL-2.1-only, see this blurb in __init__.py for example;

    # python-kmod is free software: you can redistribute it and/or modify it under
    # the terms of the GNU Lesser General Public License version 2.1 as published
    # by the Free Software Foundation.

There is not mention of the usual "or, at your option, any later
version".

Unfortunately, I noticed just right after I pushed, so I fixed that in a
followup commit, sorry for the mess...

> +PYTHON_KMOD_LICENSE_FILES = COPYING

COPYING has the text of the GPL, while the license for python-kmod is
indeed LGPL-2.1, which text is in COPYING.LESSER.

Applied to master with the above fixed, thanks.

Regards,
Yann E. MORIN.

> +PYTHON_KMOD_DEPENDENCIES = host-python-cython kmod
> +
> +$(eval $(python-package))
> -- 
> 2.41.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index 5085457276..863b97b0fc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -37,6 +37,7 @@  F:	package/flutter-engine/
 F:	package/flutter-gallery/
 F:	package/flutter-pi/
 F:	package/flutter-sdk-bin/
+F:	package/python-kmod/
 F:	package/python-versioneer/
 F:	support/testing/tests/package/test_flutter.py
 
diff --git a/package/Config.in b/package/Config.in
index 5b73a0c918..d5498eb8f9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1134,6 +1134,7 @@  menu "External python modules"
 	source "package/python-jsonschema/Config.in"
 	source "package/python-keyring/Config.in"
 	source "package/python-kiwisolver/Config.in"
+	source "package/python-kmod/Config.in"
 	source "package/python-lark/Config.in"
 	source "package/python-libconfig/Config.in"
 	source "package/python-libevdev/Config.in"
diff --git a/package/python-kmod/Config.in b/package/python-kmod/Config.in
new file mode 100644
index 0000000000..244baee3a0
--- /dev/null
+++ b/package/python-kmod/Config.in
@@ -0,0 +1,12 @@ 
+config BR2_PACKAGE_PYTHON_KMOD
+	bool "python-kmod"
+	depends on !BR2_STATIC_LIBS # kmod
+	select BR2_PACKAGE_HOST_PYTHON_CYTHON
+	select BR2_PACKAGE_KMOD
+	help
+	  Python binding for kmod
+
+	  https://github.com/maurizio-lombardi/python-kmod
+
+comment "python-kmod needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
diff --git a/package/python-kmod/python-kmod.hash b/package/python-kmod/python-kmod.hash
new file mode 100644
index 0000000000..f3cb16ef3f
--- /dev/null
+++ b/package/python-kmod/python-kmod.hash
@@ -0,0 +1,3 @@ 
+# Locally computed sha256 checksums
+sha256  0100ff27b7030a73e68ec07829d6123f412ce195dc761b954c92a38d18ba8539  python-kmod-0.9.2.tar.gz
+sha256  55f9ca11412f0bb51dc20d45d8b20e72225efb8982386ef175e901caca5ed0d9  COPYING
diff --git a/package/python-kmod/python-kmod.mk b/package/python-kmod/python-kmod.mk
new file mode 100644
index 0000000000..12df0fa413
--- /dev/null
+++ b/package/python-kmod/python-kmod.mk
@@ -0,0 +1,16 @@ 
+################################################################################
+#
+# python-kmod
+#
+################################################################################
+
+# The python-kmod package listed at https://pypi.org/project/kmod/#description
+# is not the same as the one listed below.
+PYTHON_KMOD_VERSION = 0.9.2
+PYTHON_KMOD_SITE = $(call github,maurizio-lombardi,python-kmod,v$(PYTHON_KMOD_VERSION))
+PYTHON_KMOD_SETUP_TYPE = setuptools
+PYTHON_KMOD_LICENSE = LGPL-2.1+
+PYTHON_KMOD_LICENSE_FILES = COPYING
+PYTHON_KMOD_DEPENDENCIES = host-python-cython kmod
+
+$(eval $(python-package))