package/python-brotli: new package
authorJames Hilliard <james.hilliard1@gmail.com>
Mon, 12 Aug 2019 23:03:45 +0000 (17:03 -0600)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 13 Aug 2019 13:10:54 +0000 (15:10 +0200)
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
[Thomas: license is MIT, not Apache-2.0]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
DEVELOPERS
package/Config.in
package/python-brotli/Config.in [new file with mode: 0644]
package/python-brotli/python-brotli.hash [new file with mode: 0644]
package/python-brotli/python-brotli.mk [new file with mode: 0644]

index 8ad48b95cbccc5c40767a22275174e8619c18729..27a98db256d71b12d21426363123ee642ae21c78 100644 (file)
@@ -1087,6 +1087,7 @@ F:        package/python-aiomonitor/
 F:     package/python-aiojobs/
 F:     package/python-aiorwlock/
 F:     package/python-async-timeout/
+F:     package/python-brotli/
 F:     package/python-cchardet/
 F:     package/python-multidict/
 F:     package/python-pycares/
index c984dcea6f7dd6c9ea8f78c8214531214672a986..9f544f955c7aada492eb70966578139ea44241e1 100644 (file)
@@ -844,6 +844,7 @@ menu "External python modules"
        source "package/python-beautifulsoup4/Config.in"
        source "package/python-bitstring/Config.in"
        source "package/python-bottle/Config.in"
+       source "package/python-brotli/Config.in"
        source "package/python-cached-property/Config.in"
        source "package/python-can/Config.in"
        source "package/python-cbor/Config.in"
diff --git a/package/python-brotli/Config.in b/package/python-brotli/Config.in
new file mode 100644 (file)
index 0000000..1c09c26
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_PYTHON_BROTLI
+       bool "python-brotli"
+       depends on BR2_INSTALL_LIBSTDCPP
+       help
+         Python bindings for the Brotli compression library.
+
+         https://github.com/google/brotli
diff --git a/package/python-brotli/python-brotli.hash b/package/python-brotli/python-brotli.hash
new file mode 100644 (file)
index 0000000..eaf59ae
--- /dev/null
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/brotli/json
+md5    3444b534e86f65f9f229fd123965be87  Brotli-1.0.7.zip
+sha256 0538dc1744fd17c314d2adc409ea7d1b779783b89fd95bcfb0c2acc93a6ea5a7  Brotli-1.0.7.zip
+# Locally computed sha256 checksums
+sha256 3d180008e36922a4e8daec11c34c7af264fed5962d07924aea928c38e8663c94  LICENSE
diff --git a/package/python-brotli/python-brotli.mk b/package/python-brotli/python-brotli.mk
new file mode 100644 (file)
index 0000000..745255f
--- /dev/null
@@ -0,0 +1,20 @@
+################################################################################
+#
+# python-brotli
+#
+################################################################################
+
+PYTHON_BROTLI_VERSION = 1.0.7
+PYTHON_BROTLI_SOURCE = Brotli-$(PYTHON_BROTLI_VERSION).zip
+PYTHON_BROTLI_SITE = https://files.pythonhosted.org/packages/cd/9c/7955895f5672ecc85270244582c6b53ff95bb4c24bf77bd9271d42351635
+PYTHON_BROTLI_SETUP_TYPE = setuptools
+PYTHON_BROTLI_LICENSE = MIT
+PYTHON_BROTLI_LICENSE_FILES = LICENSE
+
+define PYTHON_BROTLI_EXTRACT_CMDS
+       $(UNZIP) -d $(@D) $(PYTHON_BROTLI_DL_DIR)/$(PYTHON_BROTLI_SOURCE)
+       mv $(@D)/Brotli-$(PYTHON_BROTLI_VERSION)/* $(@D)
+       $(RM) -r $(@D)/Brotli-$(PYTHON_BROTLI_VERSION)
+endef
+
+$(eval $(python-package))