]> Git Repo - buildroot-mgba.git/commitdiff
package/python-qrcode: new package
authorThomas Petazzoni <[email protected]>
Mon, 8 Aug 2022 09:04:12 +0000 (11:04 +0200)
committerThomas Petazzoni <[email protected]>
Mon, 8 Aug 2022 20:24:45 +0000 (22:24 +0200)
Needed by python-autobahn encryption subpackage.

Signed-off-by: Thomas Petazzoni <[email protected]>
DEVELOPERS
package/Config.in
package/python-qrcode/Config.in [new file with mode: 0644]
package/python-qrcode/python-qrcode.hash [new file with mode: 0644]
package/python-qrcode/python-qrcode.mk [new file with mode: 0644]
support/testing/tests/package/sample_python_qrcode.py [new file with mode: 0644]
support/testing/tests/package/test_python_qrcode.py [new file with mode: 0644]

index 23ed6c8487b9cc14df68523a522d8fa23454bc7b..d2bd0d809a6ac54d455defee5c2d97ab60d1d98f 100644 (file)
@@ -2912,6 +2912,7 @@ F:        package/python3/
 F:     package/python-augeas/
 F:     package/python-flask-expects-json/
 F:     package/python-git/
+F:     package/python-qrcode/
 F:     package/python-serial/
 F:     package/python-unittest-xml-reporting/
 F:     package/qextserialport/
index a09ad342d928931a22798440a64deef567a0a7bc..d1c098c48f56d6d4872eed7457c888ac3fe43abd 100644 (file)
@@ -1214,6 +1214,7 @@ menu "External python modules"
        source "package/python-pyxb/Config.in"
        source "package/python-pyyaml/Config.in"
        source "package/python-pyzmq/Config.in"
+       source "package/python-qrcode/Config.in"
        source "package/python-raven/Config.in"
        source "package/python-redis/Config.in"
        source "package/python-reentry/Config.in"
diff --git a/package/python-qrcode/Config.in b/package/python-qrcode/Config.in
new file mode 100644 (file)
index 0000000..9a17cc1
--- /dev/null
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_PYTHON_QRCODE
+       bool "python-qrcode"
+       help
+         Pure python QR Code generator
+
+         https://github.com/lincolnloop/python-qrcode
+
+if BR2_PACKAGE_PYTHON_QRCODE
+
+config BR2_PACKAGE_PYTHON_QRCODE_SVG
+       bool "SVG support"
+       select BR2_PACKAGE_PYTHON3_PYEXPAT
+
+config BR2_PACKAGE_PYTHON_QRCODE_PIL
+       bool "PIL support"
+       select BR2_PACKAGE_PYTHON_PILLOW
+
+endif
diff --git a/package/python-qrcode/python-qrcode.hash b/package/python-qrcode/python-qrcode.hash
new file mode 100644 (file)
index 0000000..1ab84dd
--- /dev/null
@@ -0,0 +1,5 @@
+# md5 from https://pypi.python.org/pypi/qrcode/json
+md5  124103c685e96ba3b7a1616760f31c11  qrcode-7.3.1.tar.gz
+sha256  375a6ff240ca9bd41adc070428b5dfc1dcfbb0f2507f1ac848f6cded38956578  qrcode-7.3.1.tar.gz
+# Locally computed
+sha256  40dfb903c94ee3f789500131311186548ecba5cefd3557623d7700e2522ab994  LICENSE
diff --git a/package/python-qrcode/python-qrcode.mk b/package/python-qrcode/python-qrcode.mk
new file mode 100644 (file)
index 0000000..23e7dd3
--- /dev/null
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-qrcode
+#
+################################################################################
+
+PYTHON_QRCODE_VERSION = 7.3.1
+PYTHON_QRCODE_SOURCE = qrcode-$(PYTHON_QRCODE_VERSION).tar.gz
+PYTHON_QRCODE_SITE = https://files.pythonhosted.org/packages/94/9f/31f33cdf3cf8f98e64c42582fb82f39ca718264df61957f28b0bbb09b134
+PYTHON_QRCODE_SETUP_TYPE = setuptools
+PYTHON_QRCODE_LICENSE = BSD-3-Clause
+PYTHON_QRCODE_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
diff --git a/support/testing/tests/package/sample_python_qrcode.py b/support/testing/tests/package/sample_python_qrcode.py
new file mode 100644 (file)
index 0000000..3dcca32
--- /dev/null
@@ -0,0 +1,3 @@
+import qrcode
+import qrcode.image.svg
+img = qrcode.make('Some data here', image_factory=qrcode.image.svg.SvgImage)
diff --git a/support/testing/tests/package/test_python_qrcode.py b/support/testing/tests/package/test_python_qrcode.py
new file mode 100644 (file)
index 0000000..ca8a2b0
--- /dev/null
@@ -0,0 +1,12 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3Qrcode(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_QRCODE=y
+        BR2_PACKAGE_PYTHON_QRCODE_SVG=y
+        """
+    sample_scripts = ["tests/package/sample_python_qrcode.py"]
This page took 0.051254 seconds and 4 git commands to generate.