Message ID | 20191020190142.18672-2-asafka7@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [1/1] package/python-reentry: add host variant | expand |
On Sun, 20 Oct 2019 22:01:42 +0300 Asaf Kahlon <asafka7@gmail.com> wrote: > Add needed host variants to relevant dependencies. > > Signed-off-by: Asaf Kahlon <asafka7@gmail.com> Why do we need a host variant for python-reentry ? Thomas
Hello, On Mon, Oct 21, 2019 at 11:05 AM Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote: > > On Sun, 20 Oct 2019 22:01:42 +0300 > Asaf Kahlon <asafka7@gmail.com> wrote: > > > Add needed host variants to relevant dependencies. > > > > Signed-off-by: Asaf Kahlon <asafka7@gmail.com> > > Why do we need a host variant for python-reentry ? That's because packages which use reentry will probably have setup_requires=['reentry'] and reentry_register=True in their setup.py. On installation, reentry creates a file with the registered entrypoints that you can read on the target when you need to load them. Maybe I should send a v2 and explain that in the commit? > > Thomas > -- > Thomas Petazzoni, CTO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com Asaf.
On Mon, 21 Oct 2019 12:00:49 +0300 Asaf Kahlon <asafka7@gmail.com> wrote: > > Why do we need a host variant for python-reentry ? > > That's because packages which use reentry will probably have "probably" ? > setup_requires=['reentry'] and reentry_register=True in their > setup.py. > On installation, reentry creates a file with the registered > entrypoints that you can read on the target when you need to load > them. > Maybe I should send a v2 and explain that in the commit? Yes, we will need a better commit log, but more importantly, do we have any package in Buildroot that needs this ? Or is it custom/private packages that you have ? Thanks, Thomas
Hello, On Tue, Oct 22, 2019 at 11:27 PM Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote: > > On Mon, 21 Oct 2019 12:00:49 +0300 > Asaf Kahlon <asafka7@gmail.com> wrote: > > > > Why do we need a host variant for python-reentry ? > > > > That's because packages which use reentry will probably have > > "probably" ? Well, if you want to use reentry it's more than just "probably" =] > > > setup_requires=['reentry'] and reentry_register=True in their > > setup.py. > > On installation, reentry creates a file with the registered > > entrypoints that you can read on the target when you need to load > > them. > > Maybe I should send a v2 and explain that in the commit? > > Yes, we will need a better commit log, but more importantly, do we have > any package in Buildroot that needs this ? Or is it custom/private > packages that you have ? I don't see any Buildroot package which uses reentry... To be honest, I don't know the project in depth and I don't know who maintains it. I found it when I looked for an efficient entrypoint mechanism after I noticed that making "import pkg_resources" on my board took very long time, and I thought it would be nice to share this package with the Buildroot community in order to let other people benefit from it. In my private Python packages I use reentry as a replacement for pkg_resources and I got much improved performance. > > Thanks, > > Thomas > -- > Thomas Petazzoni, CTO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com Asaf.
diff --git a/package/python-click/python-click.mk b/package/python-click/python-click.mk index 12539f557b..1c8c28449a 100644 --- a/package/python-click/python-click.mk +++ b/package/python-click/python-click.mk @@ -12,3 +12,4 @@ PYTHON_CLICK_LICENSE_FILES = LICENSE.rst PYTHON_CLICK_SETUP_TYPE = setuptools $(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-pathlib2/python-pathlib2.mk b/package/python-pathlib2/python-pathlib2.mk index d813b77d7e..5fa885235b 100644 --- a/package/python-pathlib2/python-pathlib2.mk +++ b/package/python-pathlib2/python-pathlib2.mk @@ -12,3 +12,4 @@ PYTHON_PATHLIB2_LICENSE_FILES = LICENSE.rst PYTHON_PATHLIB2_SETUP_TYPE = setuptools $(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-reentry/python-reentry.mk b/package/python-reentry/python-reentry.mk index 428dbf2b1b..b4bd33d846 100644 --- a/package/python-reentry/python-reentry.mk +++ b/package/python-reentry/python-reentry.mk @@ -10,5 +10,10 @@ PYTHON_REENTRY_SITE = https://files.pythonhosted.org/packages/ee/3f/a90789e01c4d PYTHON_REENTRY_SETUP_TYPE = setuptools PYTHON_REENTRY_LICENSE = MIT PYTHON_REENTRY_LICENSE_FILES = LICENSE +HOST_PYTHON_REENTRY_DEPENDENCIES = \ + host-python-six + host-python-click + $(if $(BR2_PACKAGE_PYTHON),host-python-pathlib2,) $(eval $(python-package)) +$(eval $(host-python-package))
Add needed host variants to relevant dependencies. Signed-off-by: Asaf Kahlon <asafka7@gmail.com> --- package/python-click/python-click.mk | 1 + package/python-pathlib2/python-pathlib2.mk | 1 + package/python-reentry/python-reentry.mk | 5 +++++ 3 files changed, 7 insertions(+)