Skip to contentSkip to conversation

python3native, pythonnative: Separate definition and export of PYTHON_LIBRARY and PYTHON_INCLUDE_DIR

PATCH In review Khem Raj 3 participants 4 messages Sep 9, 2019

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 python3native, pythonnative: Separate definition and export of PYTHON_LIBRARY and PYTHON_INCLUDE_DIR

This helps recipes where they need to explicitly pass the variable and does not entertain the ones from environment

---
 meta/classes/python3native.bbclass | 6 ++++--
 meta/classes/pythonnative.bbclass  | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
meta/classes/python3native.bbclass +4 -2
index d98fb4c758..bed04bd941 100644
@@ -14,8 +14,8 @@ export STAGING_LIBDIR
 # find_package(PythonLibs REQUIRED)
 # which ends up using libs/includes from build host
 # Therefore pre-empt that effort
-export PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so"
-export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
+PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so"
+PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
 
 export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
 
@@ -24,3 +24,5 @@ export PYTHONNOUSERSITE = "1"
 
 # autoconf macros will use their internal default preference otherwise
 export PYTHON
+export PYTHON_LIBRARY
+export PYTHON_INCLUDE_DIR
meta/classes/pythonnative.bbclass +4 -2
index 0e9019d1e2..5fa42aaeff 100644
@@ -17,11 +17,13 @@ export STAGING_LIBDIR
 # find_package(PythonLibs REQUIRED)
 # which ends up using libs/includes from build host
 # Therefore pre-empt that effort
-export PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so"
-export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
+PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so"
+PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
 
 # suppress host user's site-packages dirs.
 export PYTHONNOUSERSITE = "1"
 
 # autoconf macros will use their internal default preference otherwise
 export PYTHON
+export PYTHON_LIBRARY
+export PYTHON_INCLUDE_DIR
Signature · 1 line
2.23.0
#1 lore raw

✗ patchtest: failure for python3native, pythonnative: Separate definition and export of PYTHON_LIBRARY and PYTHON_INCLUDE_DIR

== Series Details ==

Series: python3native, pythonnative: Separate definition and export of PYTHON_LIBRARY and PYTHON_INCLUDE_DIR
Revision: 1
URL : https://patchwork.openembedded.org/series/19781/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Patch            python3native, pythonnative: Separate definition and export of PYTHON_LIBRARY and PYTHON_INCLUDE_DIR
 Issue             Commit shortlog is too long [test_shortlog_length] 
  Suggested fix    Edit shortlog so that it is 90 characters or less (currently 100 characters)

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
#2 lore raw
In reply to Khem Raj
Quoted 33 lines · Khem Raj

This helps recipes where they need to explicitly pass the variable and
does not entertain the ones from environment

---
 meta/classes/python3native.bbclass | 6 ++++--
 meta/classes/pythonnative.bbclass  | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
meta/classes/python3native.bbclass +0 -1
index d98fb4c758..bed04bd941 100644
@@ -14,8 +14,8 @@ export STAGING_LIBDIR
 # find_package(PythonLibs REQUIRED)
 # which ends up using libs/includes from build host
 # Therefore pre-empt that effort
-export

PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so" -export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"

meta/classes/python3native.bbclass +2 -0
+PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so"
+PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
 
 export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
@@ -24,3 +24,5 @@ export PYTHONNOUSERSITE = "1"
 
 # autoconf macros will use their internal default preference

otherwise
export PYTHON

meta/classes/python3native.bbclass

Quoted 2 lines
meta/classes/python3native.bbclass +2 -0
+export PYTHON_LIBRARY
+export PYTHON_INCLUDE_DIR

I'm confused as this makes no difference to bitbake and is equivalent. exported variables are always set in the datastore...

Cheers,

Richard

author
#3 lore raw
Quoted 32 lines · Richard Purdie
Quoted 30 lines · Khem Raj

This helps recipes where they need to explicitly pass the variable and
does not entertain the ones from environment

---
 meta/classes/python3native.bbclass | 6 ++++--
 meta/classes/pythonnative.bbclass  | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
meta/classes/python3native.bbclass +0 -1
index d98fb4c758..bed04bd941 100644
@@ -14,8 +14,8 @@ export STAGING_LIBDIR
 # find_package(PythonLibs REQUIRED)
 # which ends up using libs/includes from build host
 # Therefore pre-empt that effort
-export

PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so" -export PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"

meta/classes/python3native.bbclass +2 -0
+PYTHON_LIBRARY="${STAGING_LIBDIR}/lib${PYTHON_DIR}${PYTHON_ABI}.so"
+PYTHON_INCLUDE_DIR="${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
 
 export _PYTHON_SYSCONFIGDATA_NAME="_sysconfigdata"
@@ -24,3 +24,5 @@ export PYTHONNOUSERSITE = "1"
 
Quoted 9 lines

meta/classes/python3native.bbclass

Quoted 5 lines
meta/classes/python3native.bbclass +0 -0
 # autoconf macros will use their internal default preference

otherwise
export PYTHON

meta/classes/python3native.bbclass +2 -0
+export PYTHON_LIBRARY
+export PYTHON_INCLUDE_DIR

I'm confused as this makes no difference to bitbake and is equivalent. exported variables are always set in the datastore...

I was still seeing it unset on am ARM builder, I, however, did a composite change where this change along with another change where this was used went in together so I need to test this separately

second reeason was to make it adhere to same convention in the bbclass like other variable e.g. PYTHON which inself could be reeason good for this change even if it is a nop

Quoted 4 lines

Cheers,

Richard