Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit
@ 2022-11-22 20:31 Julien Olivain
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 2/7] package/python-hkdf: new package Julien Olivain
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Julien Olivain @ 2022-11-22 20:31 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni, Asaf Kahlon

Python idna package switched to pyproject.toml in commit:
https://github.com/kjd/idna/commit/2a00e518efe55d2eeb62cd3f88ace7db41338603
which is included in idna v3.4.

When using the old setuptools infra, the package is incorrectly
installed as v0.0, which is then incorrectly detected by other
packages when using setuptools pkg_resources.

The issue can be reproduced with the command:

    python3 <<EOF
    __requires__ = ["idna >= 2.5"]
    import pkg_resources
    EOF

which will fail with output:

    pkg_resources.ContextualVersionConflict: (idna 0.0.0 (/usr/lib/python3.11/site-packages), Requirement.parse('idna>=2.5'), {'hyperlink'})
    pkg_resources.DistributionNotFound: The 'idna>=2.5' distribution was not found and is required by hyperlink

This commit changes _SETUP_TYPE to "flit" to fix this issue.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Changes v1 -> v2:
- Included James' review comment:
  - _SETUP_TYPE changed from pep517 to flit
---
 package/python-idna/python-idna.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/python-idna/python-idna.mk b/package/python-idna/python-idna.mk
index 4d9994a9c7..3976cb1518 100644
--- a/package/python-idna/python-idna.mk
+++ b/package/python-idna/python-idna.mk
@@ -9,7 +9,7 @@ PYTHON_IDNA_SOURCE = idna-$(PYTHON_IDNA_VERSION).tar.gz
 PYTHON_IDNA_SITE = https://files.pythonhosted.org/packages/8b/e1/43beb3d38dba6cb420cefa297822eac205a277ab43e5ba5d5c46faf96438
 PYTHON_IDNA_LICENSE = BSD-3-Clause
 PYTHON_IDNA_LICENSE_FILES = LICENSE.md
-PYTHON_IDNA_SETUP_TYPE = setuptools
+PYTHON_IDNA_SETUP_TYPE = flit
 
 $(eval $(python-package))
 $(eval $(host-python-package))
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH next v2 2/7] package/python-hkdf: new package
  2022-11-22 20:31 [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Julien Olivain
@ 2022-11-22 20:31 ` Julien Olivain
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 3/7] package/python-spake2: " Julien Olivain
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Julien Olivain @ 2022-11-22 20:31 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni, Asaf Kahlon

HMAC-based Extract-and-Expand Key Derivation Function (HKDF).

https://github.com/casebeer/python-hkdf

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS                                    |  3 +++
 package/Config.in                             |  1 +
 package/python-hkdf/Config.in                 |  7 ++++++
 package/python-hkdf/python-hkdf.hash          |  3 +++
 package/python-hkdf/python-hkdf.mk            | 13 +++++++++++
 .../tests/package/sample_python_hkdf.py       | 22 +++++++++++++++++++
 .../testing/tests/package/test_python_hkdf.py | 11 ++++++++++
 7 files changed, 60 insertions(+)
 create mode 100644 package/python-hkdf/Config.in
 create mode 100644 package/python-hkdf/python-hkdf.hash
 create mode 100644 package/python-hkdf/python-hkdf.mk
 create mode 100644 support/testing/tests/package/sample_python_hkdf.py
 create mode 100644 support/testing/tests/package/test_python_hkdf.py

diff --git a/DEVELOPERS b/DEVELOPERS
index fb6b329087..3c636a0d55 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1694,12 +1694,14 @@ F:	package/ola/
 F:	package/ptm2human/
 F:	package/python-distro/
 F:	package/python-gnupg/
+F:	package/python-hkdf/
 F:	package/python-pyalsa/
 F:	package/riscv-isa-sim/
 F:	package/tinycompress/
 F:	package/z3/
 F:	package/zynaddsubfx/
 F:	support/testing/tests/package/sample_python_distro.py
+F:	support/testing/tests/package/sample_python_hkdf.py
 F:	support/testing/tests/package/sample_python_gnupg.py
 F:	support/testing/tests/package/sample_python_pyalsa.py
 F:	support/testing/tests/package/test_hwloc.py
@@ -1707,6 +1709,7 @@ F:	support/testing/tests/package/test_octave.py
 F:	support/testing/tests/package/test_ola.py
 F:	support/testing/tests/package/test_ola/
 F:	support/testing/tests/package/test_python_distro.py
+F:	support/testing/tests/package/test_python_hkdf.py
 F:	support/testing/tests/package/test_python_gnupg.py
 F:	support/testing/tests/package/test_python_pyalsa.py
 F:	support/testing/tests/package/test_z3.py
diff --git a/package/Config.in b/package/Config.in
index 7b18859d02..afb42efe49 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1061,6 +1061,7 @@ menu "External python modules"
 	source "package/python-gunicorn/Config.in"
 	source "package/python-h2/Config.in"
 	source "package/python-hiredis/Config.in"
+	source "package/python-hkdf/Config.in"
 	source "package/python-hpack/Config.in"
 	source "package/python-html5lib/Config.in"
 	source "package/python-httplib2/Config.in"
diff --git a/package/python-hkdf/Config.in b/package/python-hkdf/Config.in
new file mode 100644
index 0000000000..2add348ca2
--- /dev/null
+++ b/package/python-hkdf/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_PYTHON_HKDF
+	bool "python-hkdf"
+	help
+	  HMAC-based Extract-and-Expand Key Derivation Function
+	  (HKDF).
+
+	  https://github.com/casebeer/python-hkdf
diff --git a/package/python-hkdf/python-hkdf.hash b/package/python-hkdf/python-hkdf.hash
new file mode 100644
index 0000000000..87702b4582
--- /dev/null
+++ b/package/python-hkdf/python-hkdf.hash
@@ -0,0 +1,3 @@
+# md5, sha256 from https://pypi.org/pypi/hkdf/json
+md5  d10471ad0ec891cdbe165d78282c943e  hkdf-0.0.3.tar.gz
+sha256  622a31c634bc185581530a4b44ffb731ed208acf4614f9c795bdd70e77991dca  hkdf-0.0.3.tar.gz
diff --git a/package/python-hkdf/python-hkdf.mk b/package/python-hkdf/python-hkdf.mk
new file mode 100644
index 0000000000..f495de7d0b
--- /dev/null
+++ b/package/python-hkdf/python-hkdf.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# python-hkdf
+#
+################################################################################
+
+PYTHON_HKDF_VERSION = 0.0.3
+PYTHON_HKDF_SOURCE = hkdf-$(PYTHON_HKDF_VERSION).tar.gz
+PYTHON_HKDF_SITE = https://files.pythonhosted.org/packages/c3/be/327e072850db181ce56afd51e26ec7aa5659b18466c709fa5ea2548c935f
+PYTHON_HKDF_SETUP_TYPE = setuptools
+PYTHON_HKDF_LICENSE = BSD-2-Clause
+
+$(eval $(python-package))
diff --git a/support/testing/tests/package/sample_python_hkdf.py b/support/testing/tests/package/sample_python_hkdf.py
new file mode 100644
index 0000000000..a730c633e1
--- /dev/null
+++ b/support/testing/tests/package/sample_python_hkdf.py
@@ -0,0 +1,22 @@
+import hashlib
+from binascii import hexlify, unhexlify
+
+from hkdf import Hkdf, hkdf_expand, hkdf_extract
+
+salt = b"ThisIsTheSalt."
+key_in = b"ThisIsTheSecretKey"
+key_info = b"KeyInfo1"
+key_len = 16
+expected_key = unhexlify(b"b49d6cc9065b72f3a0859377d8bb7299")
+
+prk = hkdf_extract(salt, input_key_material=key_in, hash=hashlib.sha512)
+key1 = hkdf_expand(prk, info=key_info, length=key_len)
+
+print("key1:", hexlify(key1))
+assert key1 == expected_key
+
+kdf = Hkdf(salt, input_key_material=key_in, hash=hashlib.sha512)
+key2 = kdf.expand(info=key_info, length=key_len)
+
+print("key2:", hexlify(key2))
+assert key2 == expected_key
diff --git a/support/testing/tests/package/test_python_hkdf.py b/support/testing/tests/package/test_python_hkdf.py
new file mode 100644
index 0000000000..e93c24ff60
--- /dev/null
+++ b/support/testing/tests/package/test_python_hkdf.py
@@ -0,0 +1,11 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3Hkdf(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_HKDF=y
+        """
+    sample_scripts = ["tests/package/sample_python_hkdf.py"]
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH next v2 3/7] package/python-spake2: new package
  2022-11-22 20:31 [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Julien Olivain
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 2/7] package/python-hkdf: new package Julien Olivain
@ 2022-11-22 20:31 ` Julien Olivain
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 4/7] package/python-magic-wormhole: " Julien Olivain
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Julien Olivain @ 2022-11-22 20:31 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni, Asaf Kahlon

SPAKE2 password-authenticated key exchange (in pure python).

This library implements the SPAKE2 password-authenticated key
exchange ("PAKE") algorithm. This allows two parties, who share a
weak password, to safely derive a strong shared secret (and
therefore build an encrypted+authenticated channel).

https://github.com/warner/python-spake2

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS                                    |  3 +++
 package/Config.in                             |  1 +
 package/python-spake2/Config.in               | 13 +++++++++++
 package/python-spake2/python-spake2.hash      |  5 +++++
 package/python-spake2/python-spake2.mk        | 14 ++++++++++++
 .../tests/package/sample_python_spake2.py     | 22 +++++++++++++++++++
 .../tests/package/test_python_spake2.py       | 11 ++++++++++
 7 files changed, 69 insertions(+)
 create mode 100644 package/python-spake2/Config.in
 create mode 100644 package/python-spake2/python-spake2.hash
 create mode 100644 package/python-spake2/python-spake2.mk
 create mode 100644 support/testing/tests/package/sample_python_spake2.py
 create mode 100644 support/testing/tests/package/test_python_spake2.py

diff --git a/DEVELOPERS b/DEVELOPERS
index 3c636a0d55..8807f13aae 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1696,6 +1696,7 @@ F:	package/python-distro/
 F:	package/python-gnupg/
 F:	package/python-hkdf/
 F:	package/python-pyalsa/
+F:	package/python-spake2/
 F:	package/riscv-isa-sim/
 F:	package/tinycompress/
 F:	package/z3/
@@ -1704,6 +1705,7 @@ F:	support/testing/tests/package/sample_python_distro.py
 F:	support/testing/tests/package/sample_python_hkdf.py
 F:	support/testing/tests/package/sample_python_gnupg.py
 F:	support/testing/tests/package/sample_python_pyalsa.py
+F:	support/testing/tests/package/sample_python_spake2.py
 F:	support/testing/tests/package/test_hwloc.py
 F:	support/testing/tests/package/test_octave.py
 F:	support/testing/tests/package/test_ola.py
@@ -1712,6 +1714,7 @@ F:	support/testing/tests/package/test_python_distro.py
 F:	support/testing/tests/package/test_python_hkdf.py
 F:	support/testing/tests/package/test_python_gnupg.py
 F:	support/testing/tests/package/test_python_pyalsa.py
+F:	support/testing/tests/package/test_python_spake2.py
 F:	support/testing/tests/package/test_z3.py
 
 N:	Julien Viard de Galbert <julien@vdg.name>
diff --git a/package/Config.in b/package/Config.in
index afb42efe49..9c476d9407 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1272,6 +1272,7 @@ menu "External python modules"
 	source "package/python-sockjs/Config.in"
 	source "package/python-sortedcontainers/Config.in"
 	source "package/python-soupsieve/Config.in"
+	source "package/python-spake2/Config.in"
 	source "package/python-spidev/Config.in"
 	source "package/python-sqlalchemy/Config.in"
 	source "package/python-sqliteschema/Config.in"
diff --git a/package/python-spake2/Config.in b/package/python-spake2/Config.in
new file mode 100644
index 0000000000..1c2e3a49af
--- /dev/null
+++ b/package/python-spake2/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_PYTHON_SPAKE2
+	bool "python-spake2"
+	select BR2_PACKAGE_PYTHON_HKDF # runtime
+	help
+	  SPAKE2 password-authenticated key exchange (in pure python).
+
+	  This library implements the SPAKE2 password-authenticated
+	  key exchange ("PAKE") algorithm. This allows two parties,
+	  who share a weak password, to safely derive a strong shared
+	  secret (and therefore build an encrypted+authenticated
+	  channel).
+
+	  https://github.com/warner/python-spake2
diff --git a/package/python-spake2/python-spake2.hash b/package/python-spake2/python-spake2.hash
new file mode 100644
index 0000000000..30052b1b36
--- /dev/null
+++ b/package/python-spake2/python-spake2.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/spake2/json
+md5  0155bad518bb49c39994fe0b7d9fb32c  spake2-0.8.tar.gz
+sha256  c17a614b29ee4126206e22181f70a406c618d3c6c62ca6d6779bce95e9c926f4  spake2-0.8.tar.gz
+# Locally computed sha256 checksums
+sha256  2a8a1200c3a2769d1815727f3b4439bd800f3bc88163118a36ff30b007d30031  LICENSE
diff --git a/package/python-spake2/python-spake2.mk b/package/python-spake2/python-spake2.mk
new file mode 100644
index 0000000000..99ce7dae13
--- /dev/null
+++ b/package/python-spake2/python-spake2.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-spake2
+#
+################################################################################
+
+PYTHON_SPAKE2_VERSION = 0.8
+PYTHON_SPAKE2_SOURCE = spake2-$(PYTHON_SPAKE2_VERSION).tar.gz
+PYTHON_SPAKE2_SITE = https://files.pythonhosted.org/packages/60/0b/bb5eca8e18c38a10b1c207bbe6103df091e5cf7b3e5fdc0efbcad7b85b60
+PYTHON_SPAKE2_SETUP_TYPE = setuptools
+PYTHON_SPAKE2_LICENSE = MIT
+PYTHON_SPAKE2_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
diff --git a/support/testing/tests/package/sample_python_spake2.py b/support/testing/tests/package/sample_python_spake2.py
new file mode 100644
index 0000000000..49dd914ca8
--- /dev/null
+++ b/support/testing/tests/package/sample_python_spake2.py
@@ -0,0 +1,22 @@
+from binascii import hexlify
+
+from spake2 import SPAKE2_A, SPAKE2_B
+
+
+shared_password = b"This Is The Password!"
+
+alice = SPAKE2_A(shared_password)
+alice_msg = alice.start()
+
+bob = SPAKE2_B(shared_password)
+bob_msg = bob.start()
+
+# Alice and Bob exchange their messages...
+
+alice_key = alice.finish(bob_msg)
+bob_key = bob.finish(alice_msg)
+
+print("alice_key:", hexlify(alice_key))
+print("  bob_key:", hexlify(bob_key))
+
+assert alice_key == bob_key
diff --git a/support/testing/tests/package/test_python_spake2.py b/support/testing/tests/package/test_python_spake2.py
new file mode 100644
index 0000000000..fb47a0802c
--- /dev/null
+++ b/support/testing/tests/package/test_python_spake2.py
@@ -0,0 +1,11 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3Spake2(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_SPAKE2=y
+        """
+    sample_scripts = ["tests/package/sample_python_spake2.py"]
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH next v2 4/7] package/python-magic-wormhole: new package
  2022-11-22 20:31 [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Julien Olivain
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 2/7] package/python-hkdf: new package Julien Olivain
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 3/7] package/python-spake2: " Julien Olivain
@ 2022-11-22 20:31 ` Julien Olivain
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 5/7] package/python-magic-wormhole-mailbox-server: " Julien Olivain
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Julien Olivain @ 2022-11-22 20:31 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni, Asaf Kahlon

Securely transfer data between computers.

This package provides a library and a command-line tool named
"wormhole", which makes it possible to get arbitrary-sized files
and directories (or short pieces of text) from one computer to
another. The two endpoints are identified by using identical
"wormhole codes": in general, the sending machine generates and
displays the code, which must then be typed into the receiving
machine.

https://github.com/magic-wormhole/magic-wormhole

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 package/python-magic-wormhole/Config.in       | 27 +++++++++++++++++++
 .../python-magic-wormhole.hash                |  5 ++++
 .../python-magic-wormhole.mk                  | 14 ++++++++++
 5 files changed, 48 insertions(+)
 create mode 100644 package/python-magic-wormhole/Config.in
 create mode 100644 package/python-magic-wormhole/python-magic-wormhole.hash
 create mode 100644 package/python-magic-wormhole/python-magic-wormhole.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 8807f13aae..b898d3a70b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1695,6 +1695,7 @@ F:	package/ptm2human/
 F:	package/python-distro/
 F:	package/python-gnupg/
 F:	package/python-hkdf/
+F:	package/python-magic-wormhole/
 F:	package/python-pyalsa/
 F:	package/python-spake2/
 F:	package/riscv-isa-sim/
diff --git a/package/Config.in b/package/Config.in
index 9c476d9407..302ffbe4cb 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1109,6 +1109,7 @@ menu "External python modules"
 	source "package/python-lxml/Config.in"
 	source "package/python-m2crypto/Config.in"
 	source "package/python-m2r/Config.in"
+	source "package/python-magic-wormhole/Config.in"
 	source "package/python-mako/Config.in"
 	source "package/python-markdown/Config.in"
 	source "package/python-markdown2/Config.in"
diff --git a/package/python-magic-wormhole/Config.in b/package/python-magic-wormhole/Config.in
new file mode 100644
index 0000000000..e8429d203b
--- /dev/null
+++ b/package/python-magic-wormhole/Config.in
@@ -0,0 +1,27 @@
+config BR2_PACKAGE_PYTHON_MAGIC_WORMHOLE
+	bool "python-magic-wormhole"
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-autobahn -> python-cryptography
+	select BR2_PACKAGE_PYTHON_ATTRS # runtime
+	select BR2_PACKAGE_PYTHON_AUTOBAHN # runtime
+	select BR2_PACKAGE_PYTHON_AUTOMAT # runtime
+	select BR2_PACKAGE_PYTHON_CLICK # runtime
+	select BR2_PACKAGE_PYTHON_HKDF # runtime
+	select BR2_PACKAGE_PYTHON_HUMANIZE # runtime
+	select BR2_PACKAGE_PYTHON_PYNACL # runtime
+	select BR2_PACKAGE_PYTHON_SIX # runtime
+	select BR2_PACKAGE_PYTHON_SPAKE2 # runtime
+	select BR2_PACKAGE_PYTHON_TQDM # runtime
+	select BR2_PACKAGE_PYTHON_TWISTED # runtime
+	select BR2_PACKAGE_PYTHON_TXTORCON # runtime
+	help
+	  Securely transfer data between computers.
+
+	  This package provides a library and a command-line tool
+	  named "wormhole", which makes it possible to get
+	  arbitrary-sized files and directories (or short pieces of
+	  text) from one computer to another. The two endpoints are
+	  identified by using identical "wormhole codes": in general,
+	  the sending machine generates and displays the code, which
+	  must then be typed into the receiving machine.
+
+	  https://github.com/magic-wormhole/magic-wormhole
diff --git a/package/python-magic-wormhole/python-magic-wormhole.hash b/package/python-magic-wormhole/python-magic-wormhole.hash
new file mode 100644
index 0000000000..5e880d5427
--- /dev/null
+++ b/package/python-magic-wormhole/python-magic-wormhole.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/magic-wormhole/json
+md5  ca190d92f56fe32ec8dfd4fc5aab8337  magic-wormhole-0.12.0.tar.gz
+sha256  1b0fd8a334da978f3dd96b620fa9b9348cabedf26a87f74baac7a37052928160  magic-wormhole-0.12.0.tar.gz
+# Locally computed sha256 checksums
+sha256  4a9cc2415c52cef591b6822eee68fed36d7e6d80284b09638cff61d762d99060  LICENSE
diff --git a/package/python-magic-wormhole/python-magic-wormhole.mk b/package/python-magic-wormhole/python-magic-wormhole.mk
new file mode 100644
index 0000000000..91f0f826d5
--- /dev/null
+++ b/package/python-magic-wormhole/python-magic-wormhole.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-magic-wormhole
+#
+################################################################################
+
+PYTHON_MAGIC_WORMHOLE_VERSION = 0.12.0
+PYTHON_MAGIC_WORMHOLE_SOURCE = magic-wormhole-$(PYTHON_MAGIC_WORMHOLE_VERSION).tar.gz
+PYTHON_MAGIC_WORMHOLE_SITE = https://files.pythonhosted.org/packages/d4/62/5e4a86f7c4b111e016577f1b304063ebe604f430db15465ac58b13993608
+PYTHON_MAGIC_WORMHOLE_SETUP_TYPE = setuptools
+PYTHON_MAGIC_WORMHOLE_LICENSE = MIT
+PYTHON_MAGIC_WORMHOLE_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH next v2 5/7] package/python-magic-wormhole-mailbox-server: new package
  2022-11-22 20:31 [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Julien Olivain
                   ` (2 preceding siblings ...)
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 4/7] package/python-magic-wormhole: " Julien Olivain
@ 2022-11-22 20:31 ` Julien Olivain
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 6/7] package/python-magic-wormhole-transit-relay: " Julien Olivain
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Julien Olivain @ 2022-11-22 20:31 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni, Asaf Kahlon

This package is the main server that Magic-Wormhole clients connect to.
The server performs store-and-forward delivery for small key-exchange
and control messages. Bulk data is sent over a direct TCP connection,
or through a transit-relay.

https://github.com/magic-wormhole/magic-wormhole-mailbox-server

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...the-U-open-mode-removed-in-Python-3..patch | 38 +++++++++++++++++++
 .../Config.in                                 | 15 ++++++++
 .../python-magic-wormhole-mailbox-server.hash |  5 +++
 .../python-magic-wormhole-mailbox-server.mk   | 14 +++++++
 6 files changed, 74 insertions(+)
 create mode 100644 package/python-magic-wormhole-mailbox-server/0001-setup.py-remove-the-U-open-mode-removed-in-Python-3..patch
 create mode 100644 package/python-magic-wormhole-mailbox-server/Config.in
 create mode 100644 package/python-magic-wormhole-mailbox-server/python-magic-wormhole-mailbox-server.hash
 create mode 100644 package/python-magic-wormhole-mailbox-server/python-magic-wormhole-mailbox-server.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index b898d3a70b..5497eb412c 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1696,6 +1696,7 @@ F:	package/python-distro/
 F:	package/python-gnupg/
 F:	package/python-hkdf/
 F:	package/python-magic-wormhole/
+F:	package/python-magic-wormhole-mailbox-server/
 F:	package/python-pyalsa/
 F:	package/python-spake2/
 F:	package/riscv-isa-sim/
diff --git a/package/Config.in b/package/Config.in
index 302ffbe4cb..0d95225080 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1110,6 +1110,7 @@ menu "External python modules"
 	source "package/python-m2crypto/Config.in"
 	source "package/python-m2r/Config.in"
 	source "package/python-magic-wormhole/Config.in"
+	source "package/python-magic-wormhole-mailbox-server/Config.in"
 	source "package/python-mako/Config.in"
 	source "package/python-markdown/Config.in"
 	source "package/python-markdown2/Config.in"
diff --git a/package/python-magic-wormhole-mailbox-server/0001-setup.py-remove-the-U-open-mode-removed-in-Python-3..patch b/package/python-magic-wormhole-mailbox-server/0001-setup.py-remove-the-U-open-mode-removed-in-Python-3..patch
new file mode 100644
index 0000000000..bf98537ae8
--- /dev/null
+++ b/package/python-magic-wormhole-mailbox-server/0001-setup.py-remove-the-U-open-mode-removed-in-Python-3..patch
@@ -0,0 +1,38 @@
+From df6126ee86c1f84c7e0c25fcf69543b83b1b32c6 Mon Sep 17 00:00:00 2001
+From: Julien Olivain <ju.o@free.fr>
+Date: Sat, 5 Nov 2022 13:06:07 +0100
+Subject: [PATCH] setup.py: remove the 'U' open mode removed in Python 3.11
+
+The 'U' open mode was removed in Python 3.11. See:
+https://docs.python.org/3.11/library/functions.html#open
+
+Installing with Python 3.11 fails with:
+
+    /path/to/python-magic-wormhole-mailbox-server-0.4.1/setup.py", line 20, in <module>
+        long_description=open('README.md', 'rU').read(),
+                         ^^^^^^^^^^^^^^^^^^^^^^^
+    ValueError: invalid mode: 'rU'
+
+This patch removes the 'U' open mode.
+
+Signed-off-by: Julien Olivain <ju.o@free.fr>
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 6ef292f..ad9ff5a 100644
+--- a/setup.py
++++ b/setup.py
+@@ -17,7 +17,7 @@ trove_classifiers = [
+ setup(name="magic-wormhole-mailbox-server",
+       version=versioneer.get_version(),
+       description="Securely transfer data between computers",
+-      long_description=open('README.md', 'rU').read(),
++      long_description=open('README.md', 'r').read(),
+       long_description_content_type='text/markdown',
+       author="Brian Warner",
+       author_email="warner-magic-wormhole@lothar.com",
+-- 
+2.38.1
+
diff --git a/package/python-magic-wormhole-mailbox-server/Config.in b/package/python-magic-wormhole-mailbox-server/Config.in
new file mode 100644
index 0000000000..db20d3e7b6
--- /dev/null
+++ b/package/python-magic-wormhole-mailbox-server/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_PYTHON_MAGIC_WORMHOLE_MAILBOX_SERVER
+	bool "python-magic-wormhole-mailbox-server"
+	select BR2_PACKAGE_PYTHON3_SQLITE # runtime
+	select BR2_PACKAGE_PYTHON_ATTRS # runtime
+	select BR2_PACKAGE_PYTHON_AUTOBAHN # runtime
+	select BR2_PACKAGE_PYTHON_SIX # runtime
+	select BR2_PACKAGE_PYTHON_TWISTED # runtime
+	help
+	  This package is the main server that Magic-Wormhole clients
+	  connect to. The server performs store-and-forward delivery
+	  for small key-exchange and control messages. Bulk data is
+	  sent over a direct TCP connection, or through a
+	  transit-relay.
+
+	  https://github.com/magic-wormhole/magic-wormhole-mailbox-server
diff --git a/package/python-magic-wormhole-mailbox-server/python-magic-wormhole-mailbox-server.hash b/package/python-magic-wormhole-mailbox-server/python-magic-wormhole-mailbox-server.hash
new file mode 100644
index 0000000000..c714712641
--- /dev/null
+++ b/package/python-magic-wormhole-mailbox-server/python-magic-wormhole-mailbox-server.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/magic-wormhole-mailbox-server/json
+md5  3da441df1f354a8399a728da3421ac8f  magic-wormhole-mailbox-server-0.4.1.tar.gz
+sha256  1af10592909caaf519c00e706eac842c5e77f8d4356215fe9c61c7b2258a88fb  magic-wormhole-mailbox-server-0.4.1.tar.gz
+# Locally computed sha256 checksums
+sha256  4a9cc2415c52cef591b6822eee68fed36d7e6d80284b09638cff61d762d99060  LICENSE
diff --git a/package/python-magic-wormhole-mailbox-server/python-magic-wormhole-mailbox-server.mk b/package/python-magic-wormhole-mailbox-server/python-magic-wormhole-mailbox-server.mk
new file mode 100644
index 0000000000..a3394c7dcd
--- /dev/null
+++ b/package/python-magic-wormhole-mailbox-server/python-magic-wormhole-mailbox-server.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-magic-wormhole-mailbox-server
+#
+################################################################################
+
+PYTHON_MAGIC_WORMHOLE_MAILBOX_SERVER_VERSION = 0.4.1
+PYTHON_MAGIC_WORMHOLE_MAILBOX_SERVER_SOURCE = magic-wormhole-mailbox-server-$(PYTHON_MAGIC_WORMHOLE_MAILBOX_SERVER_VERSION).tar.gz
+PYTHON_MAGIC_WORMHOLE_MAILBOX_SERVER_SITE = https://files.pythonhosted.org/packages/5b/ba/cbb211bc8f8bfdf7fb620d33331f07bcd889c7a28e7fd8a0de9029bb5a2f
+PYTHON_MAGIC_WORMHOLE_MAILBOX_SERVER_SETUP_TYPE = setuptools
+PYTHON_MAGIC_WORMHOLE_MAILBOX_SERVER_LICENSE = MIT
+PYTHON_MAGIC_WORMHOLE_MAILBOX_SERVER_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH next v2 6/7] package/python-magic-wormhole-transit-relay: new package
  2022-11-22 20:31 [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Julien Olivain
                   ` (3 preceding siblings ...)
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 5/7] package/python-magic-wormhole-mailbox-server: " Julien Olivain
@ 2022-11-22 20:31 ` Julien Olivain
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 7/7] support/testing/tests/package/test_python_magic_wormhole.py: new runtime test Julien Olivain
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Julien Olivain @ 2022-11-22 20:31 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni, Asaf Kahlon

Transit Relay server for Magic-Wormhole.

This repository implements the Magic-Wormhole "Transit Relay",
a server that helps clients establish bulk-data transit connections
even when both are behind NAT boxes. Each side makes a TCP connection
to this server and presents a handshake. Two connections with
identical handshakes are glued together, allowing them to pretend they
have a direct connection.

https://github.com/magic-wormhole/magic-wormhole-transit-relay

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS                                        |  1 +
 package/Config.in                                 |  1 +
 .../python-magic-wormhole-transit-relay/Config.in | 15 +++++++++++++++
 .../python-magic-wormhole-transit-relay.hash      |  5 +++++
 .../python-magic-wormhole-transit-relay.mk        | 14 ++++++++++++++
 5 files changed, 36 insertions(+)
 create mode 100644 package/python-magic-wormhole-transit-relay/Config.in
 create mode 100644 package/python-magic-wormhole-transit-relay/python-magic-wormhole-transit-relay.hash
 create mode 100644 package/python-magic-wormhole-transit-relay/python-magic-wormhole-transit-relay.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 5497eb412c..3564d2749b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1697,6 +1697,7 @@ F:	package/python-gnupg/
 F:	package/python-hkdf/
 F:	package/python-magic-wormhole/
 F:	package/python-magic-wormhole-mailbox-server/
+F:	package/python-magic-wormhole-transit-relay/
 F:	package/python-pyalsa/
 F:	package/python-spake2/
 F:	package/riscv-isa-sim/
diff --git a/package/Config.in b/package/Config.in
index 0d95225080..35b62d4cb5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1111,6 +1111,7 @@ menu "External python modules"
 	source "package/python-m2r/Config.in"
 	source "package/python-magic-wormhole/Config.in"
 	source "package/python-magic-wormhole-mailbox-server/Config.in"
+	source "package/python-magic-wormhole-transit-relay/Config.in"
 	source "package/python-mako/Config.in"
 	source "package/python-markdown/Config.in"
 	source "package/python-markdown2/Config.in"
diff --git a/package/python-magic-wormhole-transit-relay/Config.in b/package/python-magic-wormhole-transit-relay/Config.in
new file mode 100644
index 0000000000..1a743c10fe
--- /dev/null
+++ b/package/python-magic-wormhole-transit-relay/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_PYTHON_MAGIC_WORMHOLE_TRANSIT_RELAY
+	bool "python-magic-wormhole-transit-relay"
+	select BR2_PACKAGE_PYTHON_TWISTED # runtime
+	help
+	  Transit Relay server for Magic-Wormhole.
+
+	  This repository implements the Magic-Wormhole "Transit
+	  Relay", a server that helps clients establish bulk-data
+	  transit connections even when both are behind NAT
+	  boxes. Each side makes a TCP connection to this server and
+	  presents a handshake. Two connections with identical
+	  handshakes are glued together, allowing them to pretend they
+	  have a direct connection.
+
+	  https://github.com/magic-wormhole/magic-wormhole-transit-relay
diff --git a/package/python-magic-wormhole-transit-relay/python-magic-wormhole-transit-relay.hash b/package/python-magic-wormhole-transit-relay/python-magic-wormhole-transit-relay.hash
new file mode 100644
index 0000000000..f131477a40
--- /dev/null
+++ b/package/python-magic-wormhole-transit-relay/python-magic-wormhole-transit-relay.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/magic-wormhole-transit-relay/json
+md5  aa575a4e22b3d5099674ba88b136a9a2  magic-wormhole-transit-relay-0.2.1.tar.gz
+sha256  cb4801b46890eaff97286e0e3fec62d1d52ffe317d140083b6336a1fb4e8fa5e  magic-wormhole-transit-relay-0.2.1.tar.gz
+# Locally computed sha256 checksums
+sha256  d70f6469bb210c2aa4c0dfd74f498ef5f0467a137d8296479088e7243c5884eb  LICENSE
diff --git a/package/python-magic-wormhole-transit-relay/python-magic-wormhole-transit-relay.mk b/package/python-magic-wormhole-transit-relay/python-magic-wormhole-transit-relay.mk
new file mode 100644
index 0000000000..e4ffe6e7a6
--- /dev/null
+++ b/package/python-magic-wormhole-transit-relay/python-magic-wormhole-transit-relay.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-magic-wormhole-transit-relay
+#
+################################################################################
+
+PYTHON_MAGIC_WORMHOLE_TRANSIT_RELAY_VERSION = 0.2.1
+PYTHON_MAGIC_WORMHOLE_TRANSIT_RELAY_SOURCE = magic-wormhole-transit-relay-$(PYTHON_MAGIC_WORMHOLE_TRANSIT_RELAY_VERSION).tar.gz
+PYTHON_MAGIC_WORMHOLE_TRANSIT_RELAY_SITE = https://files.pythonhosted.org/packages/21/c9/be25bb30e327037e009657960fc594d089b118c0d81cc6a200cad1bb3852
+PYTHON_MAGIC_WORMHOLE_TRANSIT_RELAY_SETUP_TYPE = setuptools
+PYTHON_MAGIC_WORMHOLE_TRANSIT_RELAY_LICENSE = MIT
+PYTHON_MAGIC_WORMHOLE_TRANSIT_RELAY_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH next v2 7/7] support/testing/tests/package/test_python_magic_wormhole.py: new runtime test
  2022-11-22 20:31 [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Julien Olivain
                   ` (4 preceding siblings ...)
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 6/7] package/python-magic-wormhole-transit-relay: " Julien Olivain
@ 2022-11-22 20:31 ` Julien Olivain
  2022-12-21 22:21 ` [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Marcus Hoffmann via buildroot
  2023-02-07 13:31 ` Thomas Petazzoni via buildroot
  7 siblings, 0 replies; 10+ messages in thread
From: Julien Olivain @ 2022-11-22 20:31 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni, Asaf Kahlon

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS                                    |  1 +
 .../package/test_python_magic_wormhole.py     | 62 +++++++++++++++++++
 2 files changed, 63 insertions(+)
 create mode 100644 support/testing/tests/package/test_python_magic_wormhole.py

diff --git a/DEVELOPERS b/DEVELOPERS
index 3564d2749b..76325dc7f9 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1716,6 +1716,7 @@ F:	support/testing/tests/package/test_ola/
 F:	support/testing/tests/package/test_python_distro.py
 F:	support/testing/tests/package/test_python_hkdf.py
 F:	support/testing/tests/package/test_python_gnupg.py
+F:	support/testing/tests/package/test_python_magic_wormhole.py
 F:	support/testing/tests/package/test_python_pyalsa.py
 F:	support/testing/tests/package/test_python_spake2.py
 F:	support/testing/tests/package/test_z3.py
diff --git a/support/testing/tests/package/test_python_magic_wormhole.py b/support/testing/tests/package/test_python_magic_wormhole.py
new file mode 100644
index 0000000000..d6541a2480
--- /dev/null
+++ b/support/testing/tests/package/test_python_magic_wormhole.py
@@ -0,0 +1,62 @@
+import os
+
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3MagicWormhole(TestPythonPackageBase):
+    __test__ = True
+    # Need to use a different toolchain than the default due to
+    # python-cryptography using Rust (not available with uclibc)
+    config = \
+        """
+        BR2_arm=y
+        BR2_TOOLCHAIN_EXTERNAL=y
+        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
+        BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_MAGIC_WORMHOLE=y
+        BR2_PACKAGE_PYTHON_MAGIC_WORMHOLE_MAILBOX_SERVER=y
+        BR2_PACKAGE_PYTHON_MAGIC_WORMHOLE_TRANSIT_RELAY=y
+        BR2_TARGET_ROOTFS_CPIO=y
+        # BR2_TARGET_ROOTFS_TAR is not set
+        """
+    timeout = 60
+
+    def twistd_cmd(self, command):
+        s = "twistd"
+        s += " --pidfile=/tmp/{}.pid".format(command)
+        s += " --logfile=/tmp/{}.log".format(command)
+        s += " {}".format(command)
+
+        return s
+
+    def test_run(self):
+        code = "123-hello-buildroot"
+        text = "Hello Buildroot!"
+
+        relay_url = "ws://localhost:4000/v1"
+        transit_helper = "tcp:localhost:4001"
+
+        img = os.path.join(self.builddir, "images", "rootfs.cpio")
+        self.emulator.boot(arch="armv5", kernel="builtin",
+                           options=["-initrd", img])
+
+        self.emulator.login()
+
+        cmd = self.twistd_cmd("wormhole-mailbox")
+        self.assertRunOk(cmd, timeout=30)
+
+        cmd = self.twistd_cmd("transitrelay")
+        self.assertRunOk(cmd, timeout=30)
+
+        wormhole_cmd = "wormhole --relay-url={} --transit-helper={}".format(
+            relay_url, transit_helper)
+
+        cmd = wormhole_cmd + " send --code={} --text=\"{}\" & ".format(code, text)
+        cmd += "sleep 25"
+        self.assertRunOk(cmd, timeout=30)
+
+        cmd = wormhole_cmd + " receive {}".format(code)
+        output, exit_code = self.emulator.run(cmd, timeout=35)
+        self.assertEqual(exit_code, 0)
+        self.assertEqual(output[0], text)
-- 
2.38.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit
  2022-11-22 20:31 [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Julien Olivain
                   ` (5 preceding siblings ...)
  2022-11-22 20:31 ` [Buildroot] [PATCH next v2 7/7] support/testing/tests/package/test_python_magic_wormhole.py: new runtime test Julien Olivain
@ 2022-12-21 22:21 ` Marcus Hoffmann via buildroot
  2023-02-23 19:02   ` Peter Korsgaard
  2023-02-07 13:31 ` Thomas Petazzoni via buildroot
  7 siblings, 1 reply; 10+ messages in thread
From: Marcus Hoffmann via buildroot @ 2022-12-21 22:21 UTC (permalink / raw)
  To: buildroot


On 22.11.22 21:31, Julien Olivain wrote:
> Python idna package switched to pyproject.toml in commit:
> https://github.com/kjd/idna/commit/2a00e518efe55d2eeb62cd3f88ace7db41338603
> which is included in idna v3.4.
>
> When using the old setuptools infra, the package is incorrectly
> installed as v0.0, which is then incorrectly detected by other
> packages when using setuptools pkg_resources.
>
> The issue can be reproduced with the command:
>
>      python3 <<EOF
>      __requires__ = ["idna >= 2.5"]
>      import pkg_resources
>      EOF
>
> which will fail with output:
>
>      pkg_resources.ContextualVersionConflict: (idna 0.0.0 (/usr/lib/python3.11/site-packages), Requirement.parse('idna>=2.5'), {'hyperlink'})
>      pkg_resources.DistributionNotFound: The 'idna>=2.5' distribution was not found and is required by hyperlink
>
> This commit changes _SETUP_TYPE to "flit" to fix this issue.
>
> Signed-off-by: Julien Olivain <ju.o@free.fr>

Reviewed-by: Marcus Hoffmann <marcus.hoffmann@othermo.de>

> ---
> Changes v1 -> v2:
> - Included James' review comment:
>    - _SETUP_TYPE changed from pep517 to flit
> ---
>   package/python-idna/python-idna.mk | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/python-idna/python-idna.mk b/package/python-idna/python-idna.mk
> index 4d9994a9c7..3976cb1518 100644
> --- a/package/python-idna/python-idna.mk
> +++ b/package/python-idna/python-idna.mk
> @@ -9,7 +9,7 @@ PYTHON_IDNA_SOURCE = idna-$(PYTHON_IDNA_VERSION).tar.gz
>   PYTHON_IDNA_SITE = https://files.pythonhosted.org/packages/8b/e1/43beb3d38dba6cb420cefa297822eac205a277ab43e5ba5d5c46faf96438
>   PYTHON_IDNA_LICENSE = BSD-3-Clause
>   PYTHON_IDNA_LICENSE_FILES = LICENSE.md
> -PYTHON_IDNA_SETUP_TYPE = setuptools
> +PYTHON_IDNA_SETUP_TYPE = flit
>
>   $(eval $(python-package))
>   $(eval $(host-python-package))
________________________________

othermo GmbH | Sitz der Gesellschaft: Alzenau | Amtsgericht Aschaffenburg: HRB 14783 | USt-IdNr.: DE319977978 | Geschäftsführung: Dr. Dennis Metz.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit
  2022-11-22 20:31 [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Julien Olivain
                   ` (6 preceding siblings ...)
  2022-12-21 22:21 ` [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Marcus Hoffmann via buildroot
@ 2023-02-07 13:31 ` Thomas Petazzoni via buildroot
  7 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-02-07 13:31 UTC (permalink / raw)
  To: Julien Olivain; +Cc: Asaf Kahlon, buildroot

On Tue, 22 Nov 2022 21:31:24 +0100
Julien Olivain <ju.o@free.fr> wrote:

> Python idna package switched to pyproject.toml in commit:
> https://github.com/kjd/idna/commit/2a00e518efe55d2eeb62cd3f88ace7db41338603
> which is included in idna v3.4.
> 
> When using the old setuptools infra, the package is incorrectly
> installed as v0.0, which is then incorrectly detected by other
> packages when using setuptools pkg_resources.
> 
> The issue can be reproduced with the command:
> 
>     python3 <<EOF
>     __requires__ = ["idna >= 2.5"]
>     import pkg_resources
>     EOF
> 
> which will fail with output:
> 
>     pkg_resources.ContextualVersionConflict: (idna 0.0.0 (/usr/lib/python3.11/site-packages), Requirement.parse('idna>=2.5'), {'hyperlink'})
>     pkg_resources.DistributionNotFound: The 'idna>=2.5' distribution was not found and is required by hyperlink
> 
> This commit changes _SETUP_TYPE to "flit" to fix this issue.
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
> Changes v1 -> v2:
> - Included James' review comment:
>   - _SETUP_TYPE changed from pep517 to flit
> ---
>  package/python-idna/python-idna.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, entire series applied! There was really not much to fix. In one
commit, the runtime test file was forgotten in DEVELOPERS, and in
another, I've added a reference to the upstream commit for the
open(..., "rU") thing.

Thanks a lot for having added relevant runtime tests for all of this,
this is really good!

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit
  2022-12-21 22:21 ` [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Marcus Hoffmann via buildroot
@ 2023-02-23 19:02   ` Peter Korsgaard
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Korsgaard @ 2023-02-23 19:02 UTC (permalink / raw)
  To: Marcus Hoffmann via buildroot; +Cc: Marcus Hoffmann

>>>>> "Marcus" == Marcus Hoffmann via buildroot <buildroot@buildroot.org> writes:

 > On 22.11.22 21:31, Julien Olivain wrote:
 >> Python idna package switched to pyproject.toml in commit:
 >> https://github.com/kjd/idna/commit/2a00e518efe55d2eeb62cd3f88ace7db41338603
 >> which is included in idna v3.4.
 >> 
 >> When using the old setuptools infra, the package is incorrectly
 >> installed as v0.0, which is then incorrectly detected by other
 >> packages when using setuptools pkg_resources.
 >> 
 >> The issue can be reproduced with the command:
 >> 
 >> python3 <<EOF
 >> __requires__ = ["idna >= 2.5"]
 >> import pkg_resources
 >> EOF
 >> 
 >> which will fail with output:
 >> 
 >> pkg_resources.ContextualVersionConflict: (idna 0.0.0
 >> (/usr/lib/python3.11/site-packages), Requirement.parse('idna>=2.5'),
 >> {'hyperlink'})
 >> pkg_resources.DistributionNotFound: The 'idna>=2.5'
 >> distribution was not found and is required by hyperlink
 >> 
 >> This commit changes _SETUP_TYPE to "flit" to fix this issue.
 >> 
 >> Signed-off-by: Julien Olivain <ju.o@free.fr>

 > Reviewed-by: Marcus Hoffmann <marcus.hoffmann@othermo.de>

Committed to 2022.11.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-02-23 19:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-22 20:31 [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Julien Olivain
2022-11-22 20:31 ` [Buildroot] [PATCH next v2 2/7] package/python-hkdf: new package Julien Olivain
2022-11-22 20:31 ` [Buildroot] [PATCH next v2 3/7] package/python-spake2: " Julien Olivain
2022-11-22 20:31 ` [Buildroot] [PATCH next v2 4/7] package/python-magic-wormhole: " Julien Olivain
2022-11-22 20:31 ` [Buildroot] [PATCH next v2 5/7] package/python-magic-wormhole-mailbox-server: " Julien Olivain
2022-11-22 20:31 ` [Buildroot] [PATCH next v2 6/7] package/python-magic-wormhole-transit-relay: " Julien Olivain
2022-11-22 20:31 ` [Buildroot] [PATCH next v2 7/7] support/testing/tests/package/test_python_magic_wormhole.py: new runtime test Julien Olivain
2022-12-21 22:21 ` [Buildroot] [PATCH next v2 1/7] package/python-idna: set _SETUP_TYPE = flit Marcus Hoffmann via buildroot
2023-02-23 19:02   ` Peter Korsgaard
2023-02-07 13:31 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox