All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/python3: adjust _REMOVE_USELESS_FILES fix for new layout
@ 2019-08-02 17:43 Peter Korsgaard
  2019-08-03 18:24 ` Arnout Vandecappelle
  2019-08-31  7:51 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Korsgaard @ 2019-08-02 17:43 UTC (permalink / raw)
  To: buildroot

python3 nowadays appends the triplet to the config-<version>m directory:

echo target/usr/lib/python3.7/config-*
target/usr/lib/python3.7/config-3.7m-powerpc-linux-gnu

Likewise, there is no longer a pyconfig.h:

ls target/usr/lib/python3.7/config-3.7m-powerpc-linux-gnu
config.c  config.c.in  install-sh  libpython3.7m.a  Makefile
makesetup  python-config.py  python.o  Setup  Setup.local

So adjust the removal logic to match.  Use a wildcard rather than
$GNU_TARGET_NAME as buildroot and python3's idea of the triplet doesn't
always match (E.G.  for musl/uclibc).

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/python3/python3.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index decae1b721..8e6a0296ed 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -203,8 +203,8 @@ define PYTHON3_REMOVE_USELESS_FILES
 	rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config
 	rm -f $(TARGET_DIR)/usr/bin/python3-config
 	rm -f $(TARGET_DIR)/usr/bin/smtpd.py.3
-	for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/ \
-		-type f -not -name pyconfig.h -a -not -name Makefile` ; do \
+	for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m-*/ \
+		-type f -not -name Makefile` ; do \
 		rm -f $$i ; \
 	done
 	rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/__pycache__/
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] package/python3: adjust _REMOVE_USELESS_FILES fix for new layout
  2019-08-02 17:43 [Buildroot] [PATCH] package/python3: adjust _REMOVE_USELESS_FILES fix for new layout Peter Korsgaard
@ 2019-08-03 18:24 ` Arnout Vandecappelle
  2019-08-31  7:51 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2019-08-03 18:24 UTC (permalink / raw)
  To: buildroot



On 02/08/2019 19:43, Peter Korsgaard wrote:
> python3 nowadays appends the triplet to the config-<version>m directory:
> 
> echo target/usr/lib/python3.7/config-*
> target/usr/lib/python3.7/config-3.7m-powerpc-linux-gnu
> 
> Likewise, there is no longer a pyconfig.h:
> 
> ls target/usr/lib/python3.7/config-3.7m-powerpc-linux-gnu
> config.c  config.c.in  install-sh  libpython3.7m.a  Makefile
> makesetup  python-config.py  python.o  Setup  Setup.local
> 
> So adjust the removal logic to match.  Use a wildcard rather than
> $GNU_TARGET_NAME as buildroot and python3's idea of the triplet doesn't
> always match (E.G.  for musl/uclibc).
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

 Applied to master, thanks.

 Regards,
 Arnout

> ---
>  package/python3/python3.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/python3/python3.mk b/package/python3/python3.mk
> index decae1b721..8e6a0296ed 100644
> --- a/package/python3/python3.mk
> +++ b/package/python3/python3.mk
> @@ -203,8 +203,8 @@ define PYTHON3_REMOVE_USELESS_FILES
>  	rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config
>  	rm -f $(TARGET_DIR)/usr/bin/python3-config
>  	rm -f $(TARGET_DIR)/usr/bin/smtpd.py.3
> -	for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/ \
> -		-type f -not -name pyconfig.h -a -not -name Makefile` ; do \
> +	for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m-*/ \
> +		-type f -not -name Makefile` ; do \
>  		rm -f $$i ; \
>  	done
>  	rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/__pycache__/
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] package/python3: adjust _REMOVE_USELESS_FILES fix for new layout
  2019-08-02 17:43 [Buildroot] [PATCH] package/python3: adjust _REMOVE_USELESS_FILES fix for new layout Peter Korsgaard
  2019-08-03 18:24 ` Arnout Vandecappelle
@ 2019-08-31  7:51 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2019-08-31  7:51 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

 > python3 nowadays appends the triplet to the config-<version>m directory:
 > echo target/usr/lib/python3.7/config-*
 > target/usr/lib/python3.7/config-3.7m-powerpc-linux-gnu

 > Likewise, there is no longer a pyconfig.h:

 > ls target/usr/lib/python3.7/config-3.7m-powerpc-linux-gnu
 > config.c  config.c.in  install-sh  libpython3.7m.a  Makefile
 > makesetup  python-config.py  python.o  Setup  Setup.local

 > So adjust the removal logic to match.  Use a wildcard rather than
 > $GNU_TARGET_NAME as buildroot and python3's idea of the triplet doesn't
 > always match (E.G.  for musl/uclibc).

 > Signed-off-by: Peter Korsgaard <peter@korsgaard.com>

Committed to 2019.02.x and 2019.05.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-31  7:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02 17:43 [Buildroot] [PATCH] package/python3: adjust _REMOVE_USELESS_FILES fix for new layout Peter Korsgaard
2019-08-03 18:24 ` Arnout Vandecappelle
2019-08-31  7:51 ` 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.