Skip to contentSkip to conversation

package/pkg-python.mk: fix PEP517 paths

PATCH Applied James Hilliard 3 participants 3 messages Mar 30, 2022 – Apr 3, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/pkg-python.mk: fix PEP517 paths

From: Emile Cormier <[email protected]>

Use /usr target/staging prefix and / host prefix.

This allows the Python interpreter to find packages built via the new Flit infrastructure and fixes bug #14721.

---
Changes v1 -> v2:
- fixup formatting
- fix all pep517 prefix paths

---
 package/pkg-python.mk | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
package/pkg-python.mk +8 -8
index 52ce402281..867341fc7b 100644
@@ -127,16 +127,16 @@ PKG_PYTHON_PEP517_ENV = \
 PKG_PYTHON_PEP517_INSTALL_TARGET_OPTS = \
 	--interpreter=/usr/bin/python \
 	--script-kind=posix \
-	--purelib=$(TARGET_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
-	--headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)  \
+	--purelib=$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
+	--headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
 	--scripts=$(TARGET_DIR)/usr/bin \
 	--data=$(TARGET_DIR)/usr
 
 PKG_PYTHON_PEP517_INSTALL_STAGING_OPTS = \
 	--interpreter=/usr/bin/python \
 	--script-kind=posix \
-	--purelib=$(STAGING_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
-	--headers=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)  \
+	--purelib=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
+	--headers=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
 	--scripts=$(STAGING_DIR)/usr/bin \
 	--data=$(STAGING_DIR)/usr
 
@@ -147,12 +147,12 @@ HOST_PKG_PYTHON_PEP517_ENV = \
 	$(HOST_CONFIGURE_OPTS)
 
 HOST_PKG_PYTHON_PEP517_INSTALL_OPTS = \
-	--interpreter=/usr/bin/python \
+	--interpreter=/bin/python \
 	--script-kind=posix \
 	--purelib=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
-	--headers=$(HOST_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)  \
-	--scripts=$(HOST_DIR)/usr/bin \
-	--data=$(HOST_DIR)/usr
+	--headers=$(HOST_DIR)/include/python$(PYTHON3_VERSION_MAJOR) \
+	--scripts=$(HOST_DIR)/bin \
+	--data=$(HOST_DIR)
 
 ################################################################################
 # inner-python-package -- defines how the configuration, compilation
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

James, Emile, All,

On 2022-03-30 16:45 -0600, James Hilliard spake thusly:

Quoted 6 lines

From: Emile Cormier <[email protected]>

Use /usr target/staging prefix and / host prefix.

This allows the Python interpreter to find packages built via the new Flit infrastructure and fixes bug #14721.

Hint: if you reference bug fixes on their own line with:

    Fixes: #14721

then it automatically gets picked up when doing the release email, and helps closing the referenced bug.

Quoted 2 lines

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 57 lines

---
Changes v1 -> v2:
- fixup formatting
- fix all pep517 prefix paths

---
 package/pkg-python.mk | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
package/pkg-python.mk +8 -8
index 52ce402281..867341fc7b 100644
@@ -127,16 +127,16 @@ PKG_PYTHON_PEP517_ENV = \
 PKG_PYTHON_PEP517_INSTALL_TARGET_OPTS = \
 	--interpreter=/usr/bin/python \
 	--script-kind=posix \
-	--purelib=$(TARGET_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
-	--headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)  \
+	--purelib=$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
+	--headers=$(TARGET_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
 	--scripts=$(TARGET_DIR)/usr/bin \
 	--data=$(TARGET_DIR)/usr
 
 PKG_PYTHON_PEP517_INSTALL_STAGING_OPTS = \
 	--interpreter=/usr/bin/python \
 	--script-kind=posix \
-	--purelib=$(STAGING_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
-	--headers=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)  \
+	--purelib=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
+	--headers=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR) \
 	--scripts=$(STAGING_DIR)/usr/bin \
 	--data=$(STAGING_DIR)/usr
 
@@ -147,12 +147,12 @@ HOST_PKG_PYTHON_PEP517_ENV = \
 	$(HOST_CONFIGURE_OPTS)
 
 HOST_PKG_PYTHON_PEP517_INSTALL_OPTS = \
-	--interpreter=/usr/bin/python \
+	--interpreter=/bin/python \
 	--script-kind=posix \
 	--purelib=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \
-	--headers=$(HOST_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)  \
-	--scripts=$(HOST_DIR)/usr/bin \
-	--data=$(HOST_DIR)/usr
+	--headers=$(HOST_DIR)/include/python$(PYTHON3_VERSION_MAJOR) \
+	--scripts=$(HOST_DIR)/bin \
+	--data=$(HOST_DIR)
 
 ################################################################################
 # inner-python-package -- defines how the configuration, compilation
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot