All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Trevor Gamblin" <trevor.gamblin@windriver.com>
To: Alexander Kanavin <alex.kanavin@gmail.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH 29/30] Revert "python3-setuptools: patch entrypoints for faster initialization"
Date: Tue, 30 Jun 2020 10:13:09 -0400	[thread overview]
Message-ID: <e64c6f47-c724-841c-e8ff-dc7feb8aa19d@windriver.com> (raw)
In-Reply-To: <20200626071844.29134-29-alex.kanavin@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4876 bytes --]


On 6/26/20 3:18 AM, Alexander Kanavin wrote:
> Apologies, but the patch is not possible to rebase onto the new setuptools,
> as the code has changed too much. Please get it accepted upstream first.

That's fine. Their changes to setuptools actually address the same 
issue, although it's not as significant an improvement (the patch file I 
had submitted was about 2x as fast). Still, carrying the official fix is 
the better option.

Trevor

>
> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
> ---
>   .../python/python-setuptools.inc              |  4 +-
>   ...nt-usr-bin-wrappers-signoff-included.patch | 62 -------------------
>   2 files changed, 1 insertion(+), 65 deletions(-)
>   delete mode 100644 meta/recipes-devtools/python/python3-setuptools/0001-ScriptWriter-create-more-efficient-usr-bin-wrappers-signoff-included.patch
>
> diff --git a/meta/recipes-devtools/python/python-setuptools.inc b/meta/recipes-devtools/python/python-setuptools.inc
> index 3222de7079..9322ca9a05 100644
> --- a/meta/recipes-devtools/python/python-setuptools.inc
> +++ b/meta/recipes-devtools/python/python-setuptools.inc
> @@ -10,9 +10,7 @@ inherit pypi
>   
>   SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
>   
> -SRC_URI += "file://0001-change-shebang-to-python3.patch \
> -            file://0001-ScriptWriter-create-more-efficient-usr-bin-wrappers-signoff-included.patch \
> -            "
> +SRC_URI += "file://0001-change-shebang-to-python3.patch"
>   
>   SRC_URI[md5sum] = "6e9de90b242fdd60ef59f497424ce13a"
>   SRC_URI[sha256sum] = "145fa62b9d7bb544fce16e9b5a9bf4ab2032d2f758b7cd674af09a92736aff74"
> diff --git a/meta/recipes-devtools/python/python3-setuptools/0001-ScriptWriter-create-more-efficient-usr-bin-wrappers-signoff-included.patch b/meta/recipes-devtools/python/python3-setuptools/0001-ScriptWriter-create-more-efficient-usr-bin-wrappers-signoff-included.patch
> deleted file mode 100644
> index 7e931c845c..0000000000
> --- a/meta/recipes-devtools/python/python3-setuptools/0001-ScriptWriter-create-more-efficient-usr-bin-wrappers-signoff-included.patch
> +++ /dev/null
> @@ -1,62 +0,0 @@
> -From aae8cd3de3f289cea3db01212579913c925191e8 Mon Sep 17 00:00:00 2001
> -From: Lauri Tirkkonen <lauri.tirkkonen.ext@nokia.com>
> -Date: Thu, 26 Mar 2020 14:24:25 +0000
> -Subject: [PATCH] ScriptWriter: create more efficient /usr/bin wrappers
> -
> -Upstream setuptools writes scripts to /usr/bin that do insanely much
> -stuff at runtime. https://github.com/pypa/setuptools/issues/510
> -
> -Since the script entry points are already known at build time, we can
> -just write those directly into the /usr/bin wrapper, avoiding the
> -expensive 'pkg_resources' import at runtime. The idea is from
> -https://github.com/ninjaaron/fast-entry_points but patched directly into
> -the native build of setuptools here, so that all Python modules under
> -bitbake automatically use it without needing additional build time
> -dependencies.
> -
> -Upstream-Status: Pending
> -
> -Signed-off-by: Lauri Tirkkonen <lauri.tirkkonen.ext@nokia.com>
> -Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
> ----
> - setuptools/command/easy_install.py | 14 ++++++--------
> - 1 file changed, 6 insertions(+), 8 deletions(-)
> -
> -diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
> -index 8fba7b41..03a72714 100755
> ---- a/setuptools/command/easy_install.py
> -+++ b/setuptools/command/easy_install.py
> -@@ -2023,17 +2023,12 @@ class ScriptWriter(object):
> -     """
> -
> -     template = textwrap.dedent(r"""
> --        # EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
> --        __requires__ = %(spec)r
> --        import re
> -         import sys
> --        from pkg_resources import load_entry_point
> -+
> -+        from %(module)s import %(ep0)s
> -
> -         if __name__ == '__main__':
> --            sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
> --            sys.exit(
> --                load_entry_point(%(spec)r, %(group)r, %(name)r)()
> --            )
> -+            sys.exit(%(entrypoint)s())
> -     """).lstrip()
> -
> -     command_spec_class = CommandSpec
> -@@ -2068,6 +2063,9 @@ class ScriptWriter(object):
> -         for type_ in 'console', 'gui':
> -             group = type_ + '_scripts'
> -             for name, ep in dist.get_entry_map(group).items():
> -+                module = ep.module_name
> -+                ep0 = ep.attrs[0]
> -+                entrypoint = '.'.join(ep.attrs)
> -                 cls._ensure_safe_name(name)
> -                 script_text = cls.template % locals()
> -                 args = cls._get_script_args(type_, name, header, script_text)
> ---
> -2.24.1
> -
>
> 

[-- Attachment #2: Type: text/html, Size: 6387 bytes --]

  reply	other threads:[~2020-06-30 14:13 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-26  7:18 [PATCH 01/30] dnf: upgrade 4.2.21 -> 4.2.23 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 02/30] meson: upgrade 0.54.2 -> 0.54.3 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 03/30] libdnf: update 0.47.0 -> 0.48.0 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 04/30] ffmpeg: disable altivec on ppc by default Alexander Kanavin
2020-06-26  7:18 ` [PATCH 05/30] dropbear: update 2019.78 -> 2020.79 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 06/30] elfutils: upgrade 0.179 -> 0.180 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 07/30] gnu-config: update to latest revision Alexander Kanavin
2020-06-26  7:18 ` [PATCH 08/30] libgpg-error: update 1.37 -> 1.38 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 09/30] perl: update 5.30.2 -> 5.32.0 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 10/30] gst-examples: upstream releases are even numbered Alexander Kanavin
2020-06-26  7:18 ` [PATCH 11/30] bison: upgrade 3.6.3 -> 3.6.4 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 12/30] python3-cython: upgrade 0.29.19 -> 0.29.20 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 13/30] stress-ng: upgrade 0.11.12 -> 0.11.14 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 14/30] piglit: upgrade to latest revision Alexander Kanavin
2020-06-26  7:18 ` [PATCH 15/30] linux-firmware: upgrade 20200519 -> 20200619 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 16/30] systemtap: upgrade 4.2 -> 4.3 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 17/30] alsa-lib: upgrade 1.2.2 -> 1.2.3.1 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 18/30] alsa-topology-conf: upgrade 1.2.2 -> 1.2.3 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 19/30] alsa-ucm-conf: " Alexander Kanavin
2020-06-26  7:18 ` [PATCH 20/30] alsa-utils: " Alexander Kanavin
2020-06-26  7:18 ` [PATCH 21/30] puzzles: upgrade to latest revision Alexander Kanavin
2020-06-26  7:18 ` [PATCH 22/30] diffoscope: upgrade 147 -> 148 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 23/30] libcheck: upgrade 0.14.0 -> 0.15.0 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 24/30] rsync: update 3.1.3 -> 3.2.1 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 25/30] sudo: upgrade 1.9.0 -> 1.9.1 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 26/30] python3-numpy: update 1.18.5 -> 1.19.0 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 27/30] mesa: update 20.0.7 -> 20.1.2 Alexander Kanavin
2020-06-26  7:18 ` [PATCH 28/30] go-binary-native: fix upstream version check Alexander Kanavin
2020-06-26  7:18 ` [PATCH 29/30] Revert "python3-setuptools: patch entrypoints for faster initialization" Alexander Kanavin
2020-06-30 14:13   ` Trevor Gamblin [this message]
2020-06-26  7:18 ` [PATCH 30/30] python3-setuptools: upgrade 47.1.1 -> 47.3.1 Alexander Kanavin
2020-06-26  7:32 ` ✗ patchtest: failure for "dnf: upgrade 4.2.21 -> 4.2.23..." and 29 more Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e64c6f47-c724-841c-e8ff-dc7feb8aa19d@windriver.com \
    --to=trevor.gamblin@windriver.com \
    --cc=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.