package/python-whitenoise: new package
PATCH v3 1/1 package/python-whitenoise: new package
The test is using the django integration of whitenoise as it's the most common setup and allows to model the test case after the django one as well.
The setup we need to do is a bit more complicated though and follows the whitenoise getting started documentation [1].
We then request a .css file from the django admin app that is enabled by default in template project. Due to running django's development server with --nostatic we ensure that static file handling is taken over by whitenoise.
[1] https://whitenoise.readthedocs.io/en/stable/django.html
---
Changes v1 -> v2:
- update to latest version
- drop change to unrelated test
- fix lint errors in test
Changes v2 -> v3:
- update to whitenoise 6.9
- add DEVELOPERS entry
DEVELOPERS | 2 + package/Config.in | 1 + package/python-whitenoise/Config.in | 7 ++++ .../python-whitenoise/python-whitenoise.hash | 5 +++ .../python-whitenoise/python-whitenoise.mk | 14 +++++++ .../tests/package/test_python_whitenoise.py | 41 +++++++++++++++++++ 6 files changed, 70 insertions(+) create mode 100644 package/python-whitenoise/Config.in create mode 100644 package/python-whitenoise/python-whitenoise.hash create mode 100644 package/python-whitenoise/python-whitenoise.mk create mode 100644 support/testing/tests/package/test_python_whitenoise.py
DEVELOPERS +2 -0
@@ -2265,9 +2265,11 @@ F: package/python-immutabledict/ F: package/python-jc/ F: package/python-ruamel-yaml-clib/ F: package/python-waitress/ +F: package/python-whitenoise/ F: support/testing/tests/package/test_python_fastapi.py F: support/testing/tests/package/test_python_ruamel_yaml.py F: support/testing/tests/package/test_python_waitress.py +F: support/testing/tests/package/test_python_whitenoise.py F: support/testing/tests/package/sample_python_fastapi.py F: support/testing/tests/package/sample_python_ruamel_yaml.py
package/Config.in +1 -0
@@ -1476,6 +1476,7 @@ menu "External python modules" source "package/python-websocket-client/Config.in" source "package/python-websockets/Config.in" source "package/python-werkzeug/Config.in" + source "package/python-whitenoise/Config.in" source "package/python-whoosh/Config.in" source "package/python-wrapt/Config.in" source "package/python-ws4py/Config.in"
package/python-whitenoise/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_WHITENOISE + bool "python-whitenoise" + help + Radically simplified static file serving for WSGI + applications. + + https://github.com/evansd/whitenoise
package/python-whitenoise/python-whitenoise.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/whitenoise/json +md5 0341c669420de0975fce0278dc1471fe whitenoise-6.9.0.tar.gz +sha256 8c4a7c9d384694990c26f3047e118c691557481d624f069b7f7752a2f735d609 whitenoise-6.9.0.tar.gz +# Locally computed sha256 checksums +sha256 ebfd469b4fb6b5adada547747e1e8da725ecf20595d54aced043275d4f4a3600 LICENSE
package/python-whitenoise/python-whitenoise.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# python-whitenoise +# +################################################################################ + +PYTHON_WHITENOISE_VERSION = 6.9.0 +PYTHON_WHITENOISE_SOURCE = whitenoise-$(PYTHON_WHITENOISE_VERSION).tar.gz +PYTHON_WHITENOISE_SITE = https://files.pythonhosted.org/packages/b9/cf/c15c2f21aee6b22a9f6fc9be3f7e477e2442ec22848273db7f4eb73d6162 +PYTHON_WHITENOISE_SETUP_TYPE = setuptools +PYTHON_WHITENOISE_LICENSE = MIT +PYTHON_WHITENOISE_LICENSE_FILES = LICENSE + +$(eval $(python-package))
support/testing/tests/package/test_python_whitenoise.py new file +41 -0
41 lines not on this page · raw message
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot