* [Buildroot] [PATCH] package/owfs: fixup Python sysconfigdata for per-package directories
@ 2020-02-17 23:55 Thomas Petazzoni
2020-02-18 8:42 ` Arnout Vandecappelle
2020-02-18 22:14 ` Peter Korsgaard
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2020-02-17 23:55 UTC (permalink / raw)
To: buildroot
This is needed so that building the owfs Python module uses the gcc
from owfs per-package directory, and not the one from the python
per-package directory.
Fixes:
http://autobuild.buildroot.net/results/0d582dda367507991a4c38141db36b0fa8e47e67/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/owfs/owfs.mk | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/package/owfs/owfs.mk b/package/owfs/owfs.mk
index 7668735ff5..ffc0b3098d 100644
--- a/package/owfs/owfs.mk
+++ b/package/owfs/owfs.mk
@@ -87,6 +87,16 @@ OWFS_DEPENDENCIES += python host-swig
# Patching owfs to do the right thing is not trivial, it's much easier to
# override the PYSITEDIR variable in make.
OWFS_EXTRA_MAKE_OPTS += PYSITEDIR=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
+
+ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
+define OWFS_FIXUP_PYTHON_SYSCONFIGDATA
+ find $(HOST_DIR)/lib/python* $(STAGING_DIR)/usr/lib/python* \
+ -name "_sysconfigdata*.py" | xargs --no-run-if-empty \
+ $(SED) "s:$(PER_PACKAGE_DIR)/[^/]\+/:$(PER_PACKAGE_DIR)/owfs/:g"
+endef
+OWFS_PRE_CONFIGURE_HOOKS += OWFS_FIXUP_PYTHON_SYSCONFIGDATA
+endif
+
else
OWFS_CONF_OPTS += --disable-owpython --without-python
endif
--
2.24.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] package/owfs: fixup Python sysconfigdata for per-package directories
2020-02-17 23:55 [Buildroot] [PATCH] package/owfs: fixup Python sysconfigdata for per-package directories Thomas Petazzoni
@ 2020-02-18 8:42 ` Arnout Vandecappelle
2020-02-18 12:38 ` Thomas Petazzoni
2020-02-18 22:14 ` Peter Korsgaard
1 sibling, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2020-02-18 8:42 UTC (permalink / raw)
To: buildroot
On 18/02/2020 00:55, Thomas Petazzoni wrote:
> This is needed so that building the owfs Python module uses the gcc
> from owfs per-package directory, and not the one from the python
> per-package directory.
>
> Fixes:
>
> http://autobuild.buildroot.net/results/0d582dda367507991a4c38141db36b0fa8e47e67/
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
> package/owfs/owfs.mk | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/package/owfs/owfs.mk b/package/owfs/owfs.mk
> index 7668735ff5..ffc0b3098d 100644
> --- a/package/owfs/owfs.mk
> +++ b/package/owfs/owfs.mk
> @@ -87,6 +87,16 @@ OWFS_DEPENDENCIES += python host-swig
> # Patching owfs to do the right thing is not trivial, it's much easier to
> # override the PYSITEDIR variable in make.
> OWFS_EXTRA_MAKE_OPTS += PYSITEDIR=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
> +
> +ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),y)
> +define OWFS_FIXUP_PYTHON_SYSCONFIGDATA
> + find $(HOST_DIR)/lib/python* $(STAGING_DIR)/usr/lib/python* \
> + -name "_sysconfigdata*.py" | xargs --no-run-if-empty \
> + $(SED) "s:$(PER_PACKAGE_DIR)/[^/]\+/:$(PER_PACKAGE_DIR)/owfs/:g"
Why is this needed for owfs and not for all the other python packages?
I wanted to look at the autobuild failure but unfortunately it seems the server
is unresponsive...
Regards,
Arnout
> +endef
> +OWFS_PRE_CONFIGURE_HOOKS += OWFS_FIXUP_PYTHON_SYSCONFIGDATA
> +endif
> +
> else
> OWFS_CONF_OPTS += --disable-owpython --without-python
> endif
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] package/owfs: fixup Python sysconfigdata for per-package directories
2020-02-18 8:42 ` Arnout Vandecappelle
@ 2020-02-18 12:38 ` Thomas Petazzoni
2020-02-18 13:20 ` Arnout Vandecappelle
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2020-02-18 12:38 UTC (permalink / raw)
To: buildroot
Hello Arnout,
On Tue, 18 Feb 2020 09:42:25 +0100
Arnout Vandecappelle <arnout@mind.be> wrote:
> Why is this needed for owfs and not for all the other python packages?
Well:
https://patchwork.ozlabs.org/patch/1239695/
is doing exactly the same thing in the python-package infra for all
other Python packages.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] package/owfs: fixup Python sysconfigdata for per-package directories
2020-02-18 12:38 ` Thomas Petazzoni
@ 2020-02-18 13:20 ` Arnout Vandecappelle
0 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2020-02-18 13:20 UTC (permalink / raw)
To: buildroot
On 18/02/2020 13:38, Thomas Petazzoni wrote:
> Hello Arnout,
>
> On Tue, 18 Feb 2020 09:42:25 +0100
> Arnout Vandecappelle <arnout@mind.be> wrote:
>
>> Why is this needed for owfs and not for all the other python packages?
>
> Well:
>
> https://patchwork.ozlabs.org/patch/1239695/
>
> is doing exactly the same thing in the python-package infra for all
> other Python packages.
Ha! Good that I asked, it seems my imap cache was corrupted or something...
In that case: looks good to me. Or rather, feels like a hack but I don't have
any better ideas :-)
Regards,
Arnout
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] package/owfs: fixup Python sysconfigdata for per-package directories
2020-02-17 23:55 [Buildroot] [PATCH] package/owfs: fixup Python sysconfigdata for per-package directories Thomas Petazzoni
2020-02-18 8:42 ` Arnout Vandecappelle
@ 2020-02-18 22:14 ` Peter Korsgaard
1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2020-02-18 22:14 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> This is needed so that building the owfs Python module uses the gcc
> from owfs per-package directory, and not the one from the python
> per-package directory.
> Fixes:
> http://autobuild.buildroot.net/results/0d582dda367507991a4c38141db36b0fa8e47e67/
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-18 22:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 23:55 [Buildroot] [PATCH] package/owfs: fixup Python sysconfigdata for per-package directories Thomas Petazzoni
2020-02-18 8:42 ` Arnout Vandecappelle
2020-02-18 12:38 ` Thomas Petazzoni
2020-02-18 13:20 ` Arnout Vandecappelle
2020-02-18 22:14 ` Peter Korsgaard
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.