* [Buildroot] [PATCH 1/1] package/pkg-python.mk: remove hardcoded paths for host Python
@ 2022-04-05 23:34 Роман Донченко
2022-04-06 14:24 ` Arnout Vandecappelle
0 siblings, 1 reply; 4+ messages in thread
From: Роман Донченко @ 2022-04-05 23:34 UTC (permalink / raw)
To: buildroot
Cc: Роман
Донченко,
Yann E . MORIN, Thomas Petazzoni
When installer is used to install packages for host Python, it can figure
out by itself which paths to use. We just need to use the installer CLI
instead of our wrapper script.
Signed-off-by: Роман Донченко <dpb@corrigendum.ru>
---
package/pkg-python.mk | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index 867341fc7b..acd5628f3b 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -146,14 +146,6 @@ HOST_PKG_PYTHON_PEP517_ENV = \
PYTHONNOUSERSITE=1 \
$(HOST_CONFIGURE_OPTS)
-HOST_PKG_PYTHON_PEP517_INSTALL_OPTS = \
- --interpreter=/bin/python \
- --script-kind=posix \
- --purelib=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
- --headers=$(HOST_DIR)/include/python$(PYTHON3_VERSION_MAJOR) \
- --scripts=$(HOST_DIR)/bin \
- --data=$(HOST_DIR)
-
################################################################################
# inner-python-package -- defines how the configuration, compilation
# and installation of a Python package should be done, implements a
@@ -212,7 +204,7 @@ $(2)_BASE_INSTALL_STAGING_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/*
else
$(2)_BASE_ENV = $$(HOST_PKG_PYTHON_PEP517_ENV)
$(2)_BASE_BUILD_CMD = -m build -n -w
-$(2)_BASE_INSTALL_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/* $$(HOST_PKG_PYTHON_PEP517_INSTALL_OPTS)
+$(2)_BASE_INSTALL_CMD = -m installer dist/*
endif
else
$$(error "Invalid $(2)_SETUP_TYPE. Valid options are 'distutils', 'setuptools', 'pep517' or 'flit'.")
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/pkg-python.mk: remove hardcoded paths for host Python
2022-04-05 23:34 [Buildroot] [PATCH 1/1] package/pkg-python.mk: remove hardcoded paths for host Python Роман Донченко
@ 2022-04-06 14:24 ` Arnout Vandecappelle
2022-04-06 19:57 ` Роман Донченко
0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2022-04-06 14:24 UTC (permalink / raw)
To: Роман
Донченко,
buildroot, James Hilliard
Cc: Yann E . MORIN, Thomas Petazzoni
On 06/04/2022 01:34, Роман Донченко wrote:
> When installer is used to install packages for host Python, it can figure
> out by itself which paths to use. We just need to use the installer CLI
> instead of our wrapper script.
James, could you have a look at this and add it to your series that reworks
the pep517 infra? Because I think it'll create conflicts.
Also, can the installer be used for target install as well?
Regards,
Arnout
>
> Signed-off-by: Роман Донченко <dpb@corrigendum.ru>
> ---
> package/pkg-python.mk | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/package/pkg-python.mk b/package/pkg-python.mk
> index 867341fc7b..acd5628f3b 100644
> --- a/package/pkg-python.mk
> +++ b/package/pkg-python.mk
> @@ -146,14 +146,6 @@ HOST_PKG_PYTHON_PEP517_ENV = \
> PYTHONNOUSERSITE=1 \
> $(HOST_CONFIGURE_OPTS)
>
> -HOST_PKG_PYTHON_PEP517_INSTALL_OPTS = \
> - --interpreter=/bin/python \
> - --script-kind=posix \
> - --purelib=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
> - --headers=$(HOST_DIR)/include/python$(PYTHON3_VERSION_MAJOR) \
> - --scripts=$(HOST_DIR)/bin \
> - --data=$(HOST_DIR)
> -
> ################################################################################
> # inner-python-package -- defines how the configuration, compilation
> # and installation of a Python package should be done, implements a
> @@ -212,7 +204,7 @@ $(2)_BASE_INSTALL_STAGING_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/*
> else
> $(2)_BASE_ENV = $$(HOST_PKG_PYTHON_PEP517_ENV)
> $(2)_BASE_BUILD_CMD = -m build -n -w
> -$(2)_BASE_INSTALL_CMD = $(TOPDIR)/support/scripts/pyinstaller.py dist/* $$(HOST_PKG_PYTHON_PEP517_INSTALL_OPTS)
> +$(2)_BASE_INSTALL_CMD = -m installer dist/*
> endif
> else
> $$(error "Invalid $(2)_SETUP_TYPE. Valid options are 'distutils', 'setuptools', 'pep517' or 'flit'.")
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/pkg-python.mk: remove hardcoded paths for host Python
2022-04-06 14:24 ` Arnout Vandecappelle
@ 2022-04-06 19:57 ` Роман Донченко
2022-04-06 22:32 ` James Hilliard
0 siblings, 1 reply; 4+ messages in thread
From: Роман Донченко @ 2022-04-06 19:57 UTC (permalink / raw)
To: Arnout Vandecappelle, buildroot, James Hilliard
Cc: Yann E . MORIN, Thomas Petazzoni
06.04.2022 17:24, Arnout Vandecappelle пишет:
> On 06/04/2022 01:34, Роман Донченко wrote:
>> When installer is used to install packages for host Python, it can figure
>> out by itself which paths to use. We just need to use the installer CLI
>> instead of our wrapper script.
>
> James, could you have a look at this and add it to your series that
> reworks the pep517 infra? Because I think it'll create conflicts.
>
> Also, can the installer be used for target install as well?
No, installer doesn't know the settings for the target Python, and the
installer CLI isn't flexible enough to configure these settings. So a
custom script is required.
>
> Regards,
> Arnout
>
>>
>> Signed-off-by: Роман Донченко <dpb@corrigendum.ru>
>> ---
>> package/pkg-python.mk | 10 +---------
>> 1 file changed, 1 insertion(+), 9 deletions(-)
>>
>> diff --git a/package/pkg-python.mk b/package/pkg-python.mk
>> index 867341fc7b..acd5628f3b 100644
>> --- a/package/pkg-python.mk
>> +++ b/package/pkg-python.mk
>> @@ -146,14 +146,6 @@ HOST_PKG_PYTHON_PEP517_ENV = \
>> PYTHONNOUSERSITE=1 \
>> $(HOST_CONFIGURE_OPTS)
>> -HOST_PKG_PYTHON_PEP517_INSTALL_OPTS = \
>> - --interpreter=/bin/python \
>> - --script-kind=posix \
>> -
>> --purelib=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
>> - --headers=$(HOST_DIR)/include/python$(PYTHON3_VERSION_MAJOR) \
>> - --scripts=$(HOST_DIR)/bin \
>> - --data=$(HOST_DIR)
>> -
>>
>> ################################################################################
>>
>> # inner-python-package -- defines how the configuration, compilation
>> # and installation of a Python package should be done, implements a
>> @@ -212,7 +204,7 @@ $(2)_BASE_INSTALL_STAGING_CMD =
>> $(TOPDIR)/support/scripts/pyinstaller.py dist/*
>> else
>> $(2)_BASE_ENV = $$(HOST_PKG_PYTHON_PEP517_ENV)
>> $(2)_BASE_BUILD_CMD = -m build -n -w
>> -$(2)_BASE_INSTALL_CMD = $(TOPDIR)/support/scripts/pyinstaller.py
>> dist/* $$(HOST_PKG_PYTHON_PEP517_INSTALL_OPTS)
>> +$(2)_BASE_INSTALL_CMD = -m installer dist/*
>> endif
>> else
>> $$(error "Invalid $(2)_SETUP_TYPE. Valid options are 'distutils',
>> 'setuptools', 'pep517' or 'flit'.")
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/pkg-python.mk: remove hardcoded paths for host Python
2022-04-06 19:57 ` Роман Донченко
@ 2022-04-06 22:32 ` James Hilliard
0 siblings, 0 replies; 4+ messages in thread
From: James Hilliard @ 2022-04-06 22:32 UTC (permalink / raw)
To: Роман
Донченко
Cc: Yann E . MORIN, Thomas Petazzoni, buildroot
On Wed, Apr 6, 2022 at 1:57 PM Роман Донченко <dpb@corrigendum.ru> wrote:
>
> 06.04.2022 17:24, Arnout Vandecappelle пишет:
> > On 06/04/2022 01:34, Роман Донченко wrote:
> >> When installer is used to install packages for host Python, it can figure
> >> out by itself which paths to use. We just need to use the installer CLI
> >> instead of our wrapper script.
> >
> > James, could you have a look at this and add it to your series that
> > reworks the pep517 infra? Because I think it'll create conflicts.
Rebased it on my flit bootstrap migration patch:
https://patchwork.ozlabs.org/project/buildroot/patch/20220406222904.421610-2-james.hilliard1@gmail.com/
> >
> > Also, can the installer be used for target install as well?
>
> No, installer doesn't know the settings for the target Python, and the
> installer CLI isn't flexible enough to configure these settings. So a
> custom script is required.
Yeah, unfortunately upstream installer has been somewhat resistant to
adding this sort of customization functionality to the CLI.
>
> >
> > Regards,
> > Arnout
> >
> >>
> >> Signed-off-by: Роман Донченко <dpb@corrigendum.ru>
> >> ---
> >> package/pkg-python.mk | 10 +---------
> >> 1 file changed, 1 insertion(+), 9 deletions(-)
> >>
> >> diff --git a/package/pkg-python.mk b/package/pkg-python.mk
> >> index 867341fc7b..acd5628f3b 100644
> >> --- a/package/pkg-python.mk
> >> +++ b/package/pkg-python.mk
> >> @@ -146,14 +146,6 @@ HOST_PKG_PYTHON_PEP517_ENV = \
> >> PYTHONNOUSERSITE=1 \
> >> $(HOST_CONFIGURE_OPTS)
> >> -HOST_PKG_PYTHON_PEP517_INSTALL_OPTS = \
> >> - --interpreter=/bin/python \
> >> - --script-kind=posix \
> >> -
> >> --purelib=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
> >> - --headers=$(HOST_DIR)/include/python$(PYTHON3_VERSION_MAJOR) \
> >> - --scripts=$(HOST_DIR)/bin \
> >> - --data=$(HOST_DIR)
> >> -
> >>
> >> ################################################################################
> >>
> >> # inner-python-package -- defines how the configuration, compilation
> >> # and installation of a Python package should be done, implements a
> >> @@ -212,7 +204,7 @@ $(2)_BASE_INSTALL_STAGING_CMD =
> >> $(TOPDIR)/support/scripts/pyinstaller.py dist/*
> >> else
> >> $(2)_BASE_ENV = $$(HOST_PKG_PYTHON_PEP517_ENV)
> >> $(2)_BASE_BUILD_CMD = -m build -n -w
> >> -$(2)_BASE_INSTALL_CMD = $(TOPDIR)/support/scripts/pyinstaller.py
> >> dist/* $$(HOST_PKG_PYTHON_PEP517_INSTALL_OPTS)
> >> +$(2)_BASE_INSTALL_CMD = -m installer dist/*
> >> endif
> >> else
> >> $$(error "Invalid $(2)_SETUP_TYPE. Valid options are 'distutils',
> >> 'setuptools', 'pep517' or 'flit'.")
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-06 22:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 23:34 [Buildroot] [PATCH 1/1] package/pkg-python.mk: remove hardcoded paths for host Python Роман Донченко
2022-04-06 14:24 ` Arnout Vandecappelle
2022-04-06 19:57 ` Роман Донченко
2022-04-06 22:32 ` James Hilliard
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.