* [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe
@ 2020-02-01 17:47 Ming Liu
2020-02-01 17:47 ` [meta-virtualization][PATCH 2/2] python3-docker-compose: import fastentrypoints Ming Liu
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ming Liu @ 2020-02-01 17:47 UTC (permalink / raw)
To: meta-virtualization; +Cc: stefan.agner, simon.bueler, Ming Liu
From: Ming Liu <liu.ming50@gmail.com>
python3-fastentrypoints is a python module that make entry_points
specified in setup.py load more quickly.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
.../python/python3-fastentrypoints_0.12.bb | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 recipes-devtools/python/python3-fastentrypoints_0.12.bb
diff --git a/recipes-devtools/python/python3-fastentrypoints_0.12.bb b/recipes-devtools/python/python3-fastentrypoints_0.12.bb
new file mode 100644
index 0000000..7bd1651
--- /dev/null
+++ b/recipes-devtools/python/python3-fastentrypoints_0.12.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Make entry_points specified in setup.py load more quickly"
+DESCRIPTION = "Using entry_points in your setup.py makes scripts that start \
+really slowly because it imports pkg_resources, which is a horrible \
+thing to do if you want your trivial script to execute more or less \
+instantly. fastentrypoints aims to fix that bypassing pkg_resources, \
+making scripts load a lot faster."
+HOMEPAGE = "https://github.com/ninjaaron/fast-entry_points"
+SECTION = "devel/python"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://README.rst;md5=f212a0cb34eb678477972d2011fb365a"
+
+inherit pypi setuptools3
+
+SRC_URI[md5sum] = "390ad9a9229164a06156a5b1f0ef1b22"
+SRC_URI[sha256sum] = "ff284f1469bd65400599807d2c6284d5b251398e6e28811f5f77fd262292410b"
+
+BBCLASSEXTEND = "native nativesdk"
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [meta-virtualization][PATCH 2/2] python3-docker-compose: import fastentrypoints
2020-02-01 17:47 [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe Ming Liu
@ 2020-02-01 17:47 ` Ming Liu
2020-02-01 18:32 ` [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe Tim Orling
2020-02-03 22:11 ` Bruce Ashfield
2 siblings, 0 replies; 5+ messages in thread
From: Ming Liu @ 2020-02-01 17:47 UTC (permalink / raw)
To: meta-virtualization; +Cc: stefan.agner, simon.bueler, Ming Liu
From: Ming Liu <liu.ming50@gmail.com>
The docker-compose project is using console_scripts which hence imports
pkg_resources which is very slow at starting time, see:
https://github.com/pypa/setuptools/issues/510
This could be workaround by importing fastentrypoints module.
Some tests:
Before the patch, on a colibri-imx8x machine:
$ time docker-compose
```
real 0m5.108s
user 0m4.761s
sys 0m0.272s
```
After the patch, on a colibri-imx8x machine:
$ time docker-compose
```
real 0m3.526s
user 0m3.249s
sys 0m0.235s
```
Have verified the patch with:
https://docs.docker.com/compose/gettingstarted
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
---
.../0001-setup.py-import-fastentrypoints.patch | 28 ++++++++++++++++++++++
.../python3-docker-compose_1.25.0.bb | 6 ++++-
2 files changed, 33 insertions(+), 1 deletion(-)
create mode 100644 recipes-containers/docker-compose/files/0001-setup.py-import-fastentrypoints.patch
diff --git a/recipes-containers/docker-compose/files/0001-setup.py-import-fastentrypoints.patch b/recipes-containers/docker-compose/files/0001-setup.py-import-fastentrypoints.patch
new file mode 100644
index 0000000..df613e8
--- /dev/null
+++ b/recipes-containers/docker-compose/files/0001-setup.py-import-fastentrypoints.patch
@@ -0,0 +1,28 @@
+From f3a22f0f14a4b3313e6405dfb6c97df949493a34 Mon Sep 17 00:00:00 2001
+From: Ming Liu <liu.ming50@gmail.com>
+Date: Thu, 30 Jan 2020 17:22:19 +0100
+Subject: [PATCH] setup.py: import fastentrypoints
+
+Upstream-Status: Inappropriate [OE specific configuration]
+
+Signed-off-by: Ming Liu <liu.ming50@gmail.com>
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index ad57969..3cccffc 100644
+--- a/setup.py
++++ b/setup.py
+@@ -12,7 +12,7 @@ import sys
+ import pkg_resources
+ from setuptools import find_packages
+ from setuptools import setup
+-
++import fastentrypoints
+
+ def read(*parts):
+ path = os.path.join(os.path.dirname(__file__), *parts)
+--
+2.7.4
+
diff --git a/recipes-containers/docker-compose/python3-docker-compose_1.25.0.bb b/recipes-containers/docker-compose/python3-docker-compose_1.25.0.bb
index 36e2417..ba35c49 100644
--- a/recipes-containers/docker-compose/python3-docker-compose_1.25.0.bb
+++ b/recipes-containers/docker-compose/python3-docker-compose_1.25.0.bb
@@ -8,7 +8,11 @@ inherit pypi setuptools3
SRC_URI[md5sum] = "275b32cffdad6b9816dc8b4c7e55600a"
SRC_URI[sha256sum] = "2c5fcbfd3ff445b6f3eebb549cb167ef1d8f70c5806aab8f309fc8fa74cd977e"
-SRC_URI += "file://0001-setup.py-remove-maximum-version-requirements.patch"
+SRC_URI += "file://0001-setup.py-remove-maximum-version-requirements.patch \
+ file://0001-setup.py-import-fastentrypoints.patch \
+ "
+
+DEPENDS += "${PYTHON_PN}-fastentrypoints-native"
RDEPENDS_${PN} = "\
${PYTHON_PN}-cached-property \
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe
2020-02-01 17:47 [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe Ming Liu
2020-02-01 17:47 ` [meta-virtualization][PATCH 2/2] python3-docker-compose: import fastentrypoints Ming Liu
@ 2020-02-01 18:32 ` Tim Orling
2020-02-01 18:40 ` Bruce Ashfield
2020-02-03 22:11 ` Bruce Ashfield
2 siblings, 1 reply; 5+ messages in thread
From: Tim Orling @ 2020-02-01 18:32 UTC (permalink / raw)
To: Ming Liu; +Cc: meta-virtualization, simon.bueler, stefan.agner
[-- Attachment #1: Type: text/plain, Size: 1736 bytes --]
This seems generally useful and should go to meta-python?
On Sat, Feb 1, 2020 at 9:47 AM Ming Liu <liu.ming50@gmail.com> wrote:
> From: Ming Liu <liu.ming50@gmail.com>
>
> python3-fastentrypoints is a python module that make entry_points
> specified in setup.py load more quickly.
>
> Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> ---
> .../python/python3-fastentrypoints_0.12.bb | 18
> ++++++++++++++++++
> 1 file changed, 18 insertions(+)
> create mode 100644 recipes-devtools/python/
> python3-fastentrypoints_0.12.bb
>
> diff --git a/recipes-devtools/python/python3-fastentrypoints_0.12.bb
> b/recipes-devtools/python/python3-fastentrypoints_0.12.bb
> new file mode 100644
> index 0000000..7bd1651
> --- /dev/null
> +++ b/recipes-devtools/python/python3-fastentrypoints_0.12.bb
> @@ -0,0 +1,18 @@
> +SUMMARY = "Make entry_points specified in setup.py load more quickly"
> +DESCRIPTION = "Using entry_points in your setup.py makes scripts that
> start \
> +really slowly because it imports pkg_resources, which is a horrible \
> +thing to do if you want your trivial script to execute more or less \
> +instantly. fastentrypoints aims to fix that bypassing pkg_resources, \
> +making scripts load a lot faster."
> +HOMEPAGE = "https://github.com/ninjaaron/fast-entry_points"
> +SECTION = "devel/python"
> +
> +LICENSE = "BSD-2-Clause"
> +LIC_FILES_CHKSUM =
> "file://README.rst;md5=f212a0cb34eb678477972d2011fb365a"
> +
> +inherit pypi setuptools3
> +
> +SRC_URI[md5sum] = "390ad9a9229164a06156a5b1f0ef1b22"
> +SRC_URI[sha256sum] =
> "ff284f1469bd65400599807d2c6284d5b251398e6e28811f5f77fd262292410b"
> +
> +BBCLASSEXTEND = "native nativesdk"
> --
> 2.7.4
>
>
>
[-- Attachment #2: Type: text/html, Size: 2829 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe
2020-02-01 18:32 ` [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe Tim Orling
@ 2020-02-01 18:40 ` Bruce Ashfield
0 siblings, 0 replies; 5+ messages in thread
From: Bruce Ashfield @ 2020-02-01 18:40 UTC (permalink / raw)
To: Tim Orling; +Cc: Ming Liu, meta-virtualization, simon.bueler, Stefan Agner
On Sat, Feb 1, 2020 at 1:32 PM Tim Orling <ticotimo@gmail.com> wrote:
>
> This seems generally useful and should go to meta-python?
With only the one user, I'd prefer to just merge it here. If anyone
else needs it, we can consider it as a move later.
queue my rant about having it where we know we can test it :D
Bruce
>
> On Sat, Feb 1, 2020 at 9:47 AM Ming Liu <liu.ming50@gmail.com> wrote:
>>
>> From: Ming Liu <liu.ming50@gmail.com>
>>
>> python3-fastentrypoints is a python module that make entry_points
>> specified in setup.py load more quickly.
>>
>> Signed-off-by: Ming Liu <liu.ming50@gmail.com>
>> ---
>> .../python/python3-fastentrypoints_0.12.bb | 18 ++++++++++++++++++
>> 1 file changed, 18 insertions(+)
>> create mode 100644 recipes-devtools/python/python3-fastentrypoints_0.12.bb
>>
>> diff --git a/recipes-devtools/python/python3-fastentrypoints_0.12.bb b/recipes-devtools/python/python3-fastentrypoints_0.12.bb
>> new file mode 100644
>> index 0000000..7bd1651
>> --- /dev/null
>> +++ b/recipes-devtools/python/python3-fastentrypoints_0.12.bb
>> @@ -0,0 +1,18 @@
>> +SUMMARY = "Make entry_points specified in setup.py load more quickly"
>> +DESCRIPTION = "Using entry_points in your setup.py makes scripts that start \
>> +really slowly because it imports pkg_resources, which is a horrible \
>> +thing to do if you want your trivial script to execute more or less \
>> +instantly. fastentrypoints aims to fix that bypassing pkg_resources, \
>> +making scripts load a lot faster."
>> +HOMEPAGE = "https://github.com/ninjaaron/fast-entry_points"
>> +SECTION = "devel/python"
>> +
>> +LICENSE = "BSD-2-Clause"
>> +LIC_FILES_CHKSUM = "file://README.rst;md5=f212a0cb34eb678477972d2011fb365a"
>> +
>> +inherit pypi setuptools3
>> +
>> +SRC_URI[md5sum] = "390ad9a9229164a06156a5b1f0ef1b22"
>> +SRC_URI[sha256sum] = "ff284f1469bd65400599807d2c6284d5b251398e6e28811f5f77fd262292410b"
>> +
>> +BBCLASSEXTEND = "native nativesdk"
>> --
>> 2.7.4
>>
>>
>
--
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe
2020-02-01 17:47 [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe Ming Liu
2020-02-01 17:47 ` [meta-virtualization][PATCH 2/2] python3-docker-compose: import fastentrypoints Ming Liu
2020-02-01 18:32 ` [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe Tim Orling
@ 2020-02-03 22:11 ` Bruce Ashfield
2 siblings, 0 replies; 5+ messages in thread
From: Bruce Ashfield @ 2020-02-03 22:11 UTC (permalink / raw)
To: Ming Liu; +Cc: meta-virtualization, stefan.agner, simon.bueler
both patches are merged.
Bruce
In message: [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe
on 01/02/2020 Ming Liu wrote:
> From: Ming Liu <liu.ming50@gmail.com>
>
> python3-fastentrypoints is a python module that make entry_points
> specified in setup.py load more quickly.
>
> Signed-off-by: Ming Liu <liu.ming50@gmail.com>
> ---
> .../python/python3-fastentrypoints_0.12.bb | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
> create mode 100644 recipes-devtools/python/python3-fastentrypoints_0.12.bb
>
> diff --git a/recipes-devtools/python/python3-fastentrypoints_0.12.bb b/recipes-devtools/python/python3-fastentrypoints_0.12.bb
> new file mode 100644
> index 0000000..7bd1651
> --- /dev/null
> +++ b/recipes-devtools/python/python3-fastentrypoints_0.12.bb
> @@ -0,0 +1,18 @@
> +SUMMARY = "Make entry_points specified in setup.py load more quickly"
> +DESCRIPTION = "Using entry_points in your setup.py makes scripts that start \
> +really slowly because it imports pkg_resources, which is a horrible \
> +thing to do if you want your trivial script to execute more or less \
> +instantly. fastentrypoints aims to fix that bypassing pkg_resources, \
> +making scripts load a lot faster."
> +HOMEPAGE = "https://github.com/ninjaaron/fast-entry_points"
> +SECTION = "devel/python"
> +
> +LICENSE = "BSD-2-Clause"
> +LIC_FILES_CHKSUM = "file://README.rst;md5=f212a0cb34eb678477972d2011fb365a"
> +
> +inherit pypi setuptools3
> +
> +SRC_URI[md5sum] = "390ad9a9229164a06156a5b1f0ef1b22"
> +SRC_URI[sha256sum] = "ff284f1469bd65400599807d2c6284d5b251398e6e28811f5f77fd262292410b"
> +
> +BBCLASSEXTEND = "native nativesdk"
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-03 22:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-01 17:47 [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe Ming Liu
2020-02-01 17:47 ` [meta-virtualization][PATCH 2/2] python3-docker-compose: import fastentrypoints Ming Liu
2020-02-01 18:32 ` [meta-virtualization][PATCH 1/2] python3-fastentrypoints: add recipe Tim Orling
2020-02-01 18:40 ` Bruce Ashfield
2020-02-03 22:11 ` Bruce Ashfield
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.