diff mbox series

[meta-python] whitenoise: add a new recipe

Message ID 20240212104855.29980-1-fathi.boudra@linaro.org
State New, archived
Headers show
Series [meta-python] whitenoise: add a new recipe | expand

Commit Message

Fathi Boudra Feb. 12, 2024, 10:48 a.m. UTC
Radically simplified static file serving for Python web apps

With a couple of lines of config WhiteNoise allows your web app
to serve its own static files, making it a self-contained unit
that can be deployed anywhere without relying on nginx, Amazon S3
or any other external service.

https://whitenoise.readthedocs.io/en/latest/

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
---
 .../0001-add-setup.py.patch                   | 25 +++++++++++++++++++
 .../python/python3-whitenoise_6.6.0.bb        | 21 ++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch
 create mode 100644 meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb

Comments

Tim Orling Feb. 12, 2024, 3:14 p.m. UTC | #1
On Mon, Feb 12, 2024 at 2:49 AM Fathi Boudra <fathi.boudra@linaro.org>
wrote:

> Radically simplified static file serving for Python web apps
>
> With a couple of lines of config WhiteNoise allows your web app
> to serve its own static files, making it a self-contained unit
> that can be deployed anywhere without relying on nginx, Amazon S3
> or any other external service.
>
> https://whitenoise.readthedocs.io/en/latest/
>
> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
> ---
>  .../0001-add-setup.py.patch                   | 25 +++++++++++++++++++
>  .../python/python3-whitenoise_6.6.0.bb        | 21 ++++++++++++++++
>  2 files changed, 46 insertions(+)
>  create mode 100644
> meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch
>  create mode 100644 meta-python/recipes-devtools/python/
> python3-whitenoise_6.6.0.bb
>
> diff --git
> a/meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch
> b/meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch


Rather than carry a patch to add deprecated setup.py,
you can inherit python_setuptools_build_meta according to
https://github.com/evansd/whitenoise/blob/dbfd5f262f3390bd2304113a1b4eefa521056ef4/pyproject.toml#L2

>
> new file mode 100644
> index 0000000000..48a861496e
> --- /dev/null
> +++
> b/meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch
> @@ -0,0 +1,25 @@
> +From ded40864cd0d74e0881040ed580917128a83f40f Mon Sep 17 00:00:00 2001
> +From: Sahaj Sarup <sahaj.sarup@linaro.org>
> +Date: Thu, 16 Mar 2023 05:20:49 +0530
> +Subject: [PATCH] add setup.py
> +
> +Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
> +
> +Upstream-Status: Pending
> +---
> + setup.py | 3 +++
> + 1 file changed, 3 insertions(+)
> + create mode 100644 setup.py
> +
> +diff --git a/setup.py b/setup.py
> +new file mode 100644
> +index 0000000..f13cf21
> +--- /dev/null
> ++++ b/setup.py
> +@@ -0,0 +1,3 @@
> ++from setuptools import setup
> ++if __name__ == '__main__':
> ++    setup()
> +--
> +2.43.0
> +
> diff --git a/meta-python/recipes-devtools/python/
> python3-whitenoise_6.6.0.bb b/meta-python/recipes-devtools/python/
> python3-whitenoise_6.6.0.bb
> new file mode 100644
> index 0000000000..4948977448
> --- /dev/null
> +++ b/meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb
> @@ -0,0 +1,21 @@
> +SUMMARY = "Radically simplified static file serving for WSGI applications"
> +AUTHOR = "David Evans <d@evans.io>"
> +HOMEPAGE = "https://whitenoise.evans.io"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=aba4901cc64e401cea5a267eac2a2e1e"
> +
> +PYPI_PACKAGE = "whitenoise"
> +
> +SRC_URI += "file://0001-add-setup.py.patch"
> +
> +SRC_URI[sha256sum] =
> "8998f7370973447fac1e8ef6e8ded2c5209a7b1f67c1012866dbcd09681c3251"
> +
> +inherit pypi setuptools3
> +
> +RDEPENDS:${PN}:append = " \
> +    python3-brotli \
> +    python3-coverage \
> +    python3-django \
> +    python3-pytest \
> +    python3-requests \
> +"
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#108706):
> https://lists.openembedded.org/g/openembedded-devel/message/108706
> Mute This Topic: https://lists.openembedded.org/mt/104309104/924729
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> ticotimo@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Fathi Boudra Feb. 12, 2024, 3:51 p.m. UTC | #2
Thanks Tim. v2 on its way.

On Mon, 12 Feb 2024 at 16:14, Tim Orling <ticotimo@gmail.com> wrote:
>
>
>
> On Mon, Feb 12, 2024 at 2:49 AM Fathi Boudra <fathi.boudra@linaro.org> wrote:
>>
>> Radically simplified static file serving for Python web apps
>>
>> With a couple of lines of config WhiteNoise allows your web app
>> to serve its own static files, making it a self-contained unit
>> that can be deployed anywhere without relying on nginx, Amazon S3
>> or any other external service.
>>
>> https://whitenoise.readthedocs.io/en/latest/
>>
>> Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
>> ---
>>  .../0001-add-setup.py.patch                   | 25 +++++++++++++++++++
>>  .../python/python3-whitenoise_6.6.0.bb        | 21 ++++++++++++++++
>>  2 files changed, 46 insertions(+)
>>  create mode 100644 meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch
>>  create mode 100644 meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb
>>
>> diff --git a/meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch b/meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch
>
>
> Rather than carry a patch to add deprecated setup.py,
> you can inherit python_setuptools_build_meta according to
> https://github.com/evansd/whitenoise/blob/dbfd5f262f3390bd2304113a1b4eefa521056ef4/pyproject.toml#L2
>>
>>
>> new file mode 100644
>> index 0000000000..48a861496e
>> --- /dev/null
>> +++ b/meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch
>> @@ -0,0 +1,25 @@
>> +From ded40864cd0d74e0881040ed580917128a83f40f Mon Sep 17 00:00:00 2001
>> +From: Sahaj Sarup <sahaj.sarup@linaro.org>
>> +Date: Thu, 16 Mar 2023 05:20:49 +0530
>> +Subject: [PATCH] add setup.py
>> +
>> +Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
>> +
>> +Upstream-Status: Pending
>> +---
>> + setup.py | 3 +++
>> + 1 file changed, 3 insertions(+)
>> + create mode 100644 setup.py
>> +
>> +diff --git a/setup.py b/setup.py
>> +new file mode 100644
>> +index 0000000..f13cf21
>> +--- /dev/null
>> ++++ b/setup.py
>> +@@ -0,0 +1,3 @@
>> ++from setuptools import setup
>> ++if __name__ == '__main__':
>> ++    setup()
>> +--
>> +2.43.0
>> +
>> diff --git a/meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb b/meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb
>> new file mode 100644
>> index 0000000000..4948977448
>> --- /dev/null
>> +++ b/meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb
>> @@ -0,0 +1,21 @@
>> +SUMMARY = "Radically simplified static file serving for WSGI applications"
>> +AUTHOR = "David Evans <d@evans.io>"
>> +HOMEPAGE = "https://whitenoise.evans.io"
>> +LICENSE = "MIT"
>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=aba4901cc64e401cea5a267eac2a2e1e"
>> +
>> +PYPI_PACKAGE = "whitenoise"
>> +
>> +SRC_URI += "file://0001-add-setup.py.patch"
>> +
>> +SRC_URI[sha256sum] = "8998f7370973447fac1e8ef6e8ded2c5209a7b1f67c1012866dbcd09681c3251"
>> +
>> +inherit pypi setuptools3
>> +
>> +RDEPENDS:${PN}:append = " \
>> +    python3-brotli \
>> +    python3-coverage \
>> +    python3-django \
>> +    python3-pytest \
>> +    python3-requests \
>> +"
>> --
>> 2.43.0
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#108706): https://lists.openembedded.org/g/openembedded-devel/message/108706
>> Mute This Topic: https://lists.openembedded.org/mt/104309104/924729
>> Group Owner: openembedded-devel+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ticotimo@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch b/meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch
new file mode 100644
index 0000000000..48a861496e
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-whitenoise/0001-add-setup.py.patch
@@ -0,0 +1,25 @@ 
+From ded40864cd0d74e0881040ed580917128a83f40f Mon Sep 17 00:00:00 2001
+From: Sahaj Sarup <sahaj.sarup@linaro.org>
+Date: Thu, 16 Mar 2023 05:20:49 +0530
+Subject: [PATCH] add setup.py
+
+Signed-off-by: Sahaj Sarup <sahaj.sarup@linaro.org>
+
+Upstream-Status: Pending
+---
+ setup.py | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 setup.py
+
+diff --git a/setup.py b/setup.py
+new file mode 100644
+index 0000000..f13cf21
+--- /dev/null
++++ b/setup.py
+@@ -0,0 +1,3 @@
++from setuptools import setup
++if __name__ == '__main__':
++    setup()
+-- 
+2.43.0
+
diff --git a/meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb b/meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb
new file mode 100644
index 0000000000..4948977448
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-whitenoise_6.6.0.bb
@@ -0,0 +1,21 @@ 
+SUMMARY = "Radically simplified static file serving for WSGI applications"
+AUTHOR = "David Evans <d@evans.io>"
+HOMEPAGE = "https://whitenoise.evans.io"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=aba4901cc64e401cea5a267eac2a2e1e"
+
+PYPI_PACKAGE = "whitenoise"
+
+SRC_URI += "file://0001-add-setup.py.patch"
+
+SRC_URI[sha256sum] = "8998f7370973447fac1e8ef6e8ded2c5209a7b1f67c1012866dbcd09681c3251"
+
+inherit pypi setuptools3
+
+RDEPENDS:${PN}:append = " \
+    python3-brotli \
+    python3-coverage \
+    python3-django \
+    python3-pytest \
+    python3-requests \
+"