* [PATCH 00/15] fix python buildpaths QA issue
@ 2016-02-26 1:44 Hongxu Jia
2016-02-26 1:44 ` [PATCH 07/15] insane:add buildpaths QA ignore pattern Hongxu Jia
` (9 more replies)
0 siblings, 10 replies; 16+ messages in thread
From: Hongxu Jia @ 2016-02-26 1:44 UTC (permalink / raw)
To: openembedded-core, liezhi.yang, ross.burton, alejandro.hernandez,
richard.purdie
- Patch 01-06 has be sent in previous pull request.
- add buildpaths QA ignore pattern, and ignore Makefile by default
- fix .pyc/.pyo buildpath QA issue
- fix python related buildpath QA issue
Test Steps:
vim local.conf
...
MACHINE ?= "qemux86-64"
WARN_QA += "buildpaths"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "core2-32"
...
bitbake -k world
In oe-core, these patches fixed 40+ recipes' buildpath QA issue,
and fixed all python related buildpath QA issue.
There are still 55 recipes left that has buildpath QA issue.
//Hongxu
The following changes since commit 23056103c949b498c23b47579e8dd57ce78e6ed9:
uclibc: Do not use immediate expansion operator (2016-02-22 20:42:48 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib hongxu/fix-buildpath
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=hongxu/fix-buildpath
Hongxu Jia (15):
depmodwrapper-cross: nopackages to avoid QA [buildpaths] issue
gcc: use relative path for configure script
bison/gettext: add --with-bisonlocaledir to assign BISON_LOCALEDIR
openssl: substitute buildpath in source code
btrfs-tools: fix symlink creation multiple times
git: fix installed-vs-shipped QA Issue
insane:add buildpaths QA ignore pattern
python2/3: fix buildpath QA issue
bbclass distutils/distutils3: fix .pyc/.pyo buildpath
python-setuptools/python3-setuptools: use old-style install
python3-pip: use old-style install
bbclass distutils/distutils3/setuptools/setuptools3: clean up
DISTUTILS_INSTALL_ARGS
python-pygobject: fix buildpath QA issue
python-numpy: fix buildpaths QA issue
python-pycairo: fix buildpath QA issue
meta/classes/distutils.bbclass | 8 +--
meta/classes/distutils3.bbclass | 8 +--
meta/classes/insane.bbclass | 13 +++++
meta/classes/setuptools.bbclass | 5 --
meta/classes/setuptools3.bbclass | 5 --
meta/recipes-connectivity/openssl/openssl.inc | 2 +-
.../substitute-buildpath-in-source-code.patch | 41 ++++++++++++++
.../recipes-connectivity/openssl/openssl_1.0.2f.bb | 1 +
.../gettext-0.19.6/add-with-bisonlocaledir.patch | 58 ++++++++++++++++++++
meta/recipes-core/gettext/gettext_0.19.6.bb | 4 ++
.../bison/bison/add-with-bisonlocaledir.patch | 58 ++++++++++++++++++++
meta/recipes-devtools/bison/bison_3.0.4.bb | 1 +
.../fix-symlink-creation-multiple-times.patch | 46 ++++++++++++++++
.../btrfs-tools/btrfs-tools_4.4.bb | 1 +
meta/recipes-devtools/gcc/gcc-runtime.inc | 3 +-
meta/recipes-devtools/gcc/gcc-sanitizers.inc | 3 +-
meta/recipes-devtools/gcc/libgcc-common.inc | 3 +-
meta/recipes-devtools/gcc/libgfortran.inc | 3 +-
meta/recipes-devtools/git/git.inc | 2 +
.../remove-build-path-in-comments.patch | 30 +++++++++++
.../recipes-devtools/python/python-numpy_1.10.4.bb | 1 +
...trip-off-build-path-in-purported-filename.patch | 62 ++++++++++++++++++++++
.../python/python-pycairo_1.10.0.bb | 22 ++++----
.../python/python-pygobject_2.28.3.bb | 5 ++
.../python/python-setuptools_19.4.bb | 2 -
.../use-relative-path-to-compile-source-file.patch | 31 +++++++++++
meta/recipes-devtools/python/python3-pip_8.0.0.bb | 12 -----
.../python/python3-setuptools_19.4.bb | 8 +--
.../use-relative-path-to-compile-source-file.patch | 31 +++++++++++
meta/recipes-devtools/python/python3_3.5.1.bb | 10 +++-
meta/recipes-devtools/python/python_2.7.11.bb | 8 +++
.../recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 2 +
32 files changed, 438 insertions(+), 51 deletions(-)
create mode 100644 meta/recipes-connectivity/openssl/openssl/substitute-buildpath-in-source-code.patch
create mode 100644 meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch
create mode 100644 meta/recipes-devtools/bison/bison/add-with-bisonlocaledir.patch
create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch
create mode 100644 meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch
create mode 100644 meta/recipes-devtools/python/python-pycairo/strip-off-build-path-in-purported-filename.patch
create mode 100644 meta/recipes-devtools/python/python/use-relative-path-to-compile-source-file.patch
create mode 100644 meta/recipes-devtools/python/python3/use-relative-path-to-compile-source-file.patch
--
1.9.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 07/15] insane:add buildpaths QA ignore pattern
2016-02-26 1:44 [PATCH 00/15] fix python buildpaths QA issue Hongxu Jia
@ 2016-02-26 1:44 ` Hongxu Jia
2016-02-26 1:44 ` [PATCH 08/15] python2/3: fix buildpath QA issue Hongxu Jia
` (8 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2016-02-26 1:44 UTC (permalink / raw)
To: openembedded-core, liezhi.yang, ross.burton, alejandro.hernandez,
richard.purdie
Add variable QA_BUILDPATHS_SKIP_PATTERN to ignore buildpaths QA
while filename (do not include directory) matches patterns,
the patterns are Unix shell style and separated by space.
[YOCTO #9169]
[YOCTO #7058]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/classes/insane.bbclass | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 61936e1..57a3e42 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -592,11 +592,16 @@ def package_qa_hash_style(path, name, d, elf, messages):
package_qa_add_message(messages, "ldflags", "No GNU_HASH in the elf binary: '%s'" % path)
+# Ignore buildpaths QA while filename (do not include directory)
+# matches patterns, patterns are Unix shell style and separated by space
+QA_BUILDPATHS_SKIP_PATTERN ??= "Makefile"
QAPATHTEST[buildpaths] = "package_qa_check_buildpaths"
def package_qa_check_buildpaths(path, name, d, elf, messages):
"""
Check for build paths inside target files and error if not found in the whitelist
"""
+ from fnmatch import fnmatch
+
# Ignore .debug files, not interesting
if path.find(".debug") != -1:
return
@@ -609,6 +614,14 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
if path.find(name + "/CONTROL/") != -1 or path.find(name + "/DEBIAN/") != -1:
return
+ # Ignore matched pattern file
+ ignores = d.getVar('QA_BUILDPATHS_SKIP_PATTERN', True).split()
+ file = os.path.basename(path)
+ for ignore in ignores:
+ if fnmatch(file, ignore):
+ bb.note("Package %s skipping buildpaths QA: %s" % (name, path))
+ return
+
tmpdir = d.getVar('TMPDIR', True)
with open(path) as f:
file_content = f.read()
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 08/15] python2/3: fix buildpath QA issue
2016-02-26 1:44 [PATCH 00/15] fix python buildpaths QA issue Hongxu Jia
2016-02-26 1:44 ` [PATCH 07/15] insane:add buildpaths QA ignore pattern Hongxu Jia
@ 2016-02-26 1:44 ` Hongxu Jia
2016-02-26 1:44 ` [PATCH 09/15] bbclass distutils/distutils3: fix .pyc/.pyo buildpath Hongxu Jia
` (7 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2016-02-26 1:44 UTC (permalink / raw)
To: openembedded-core, liezhi.yang, ross.burton, alejandro.hernandez,
richard.purdie
- use relative path to compile source file
- Since _sysconfigdata.py was modified at do_package,
so remove _sysconfigdata.pyc is ok (Python2 only).
- Add _sysconfigdata.py and Makefile it to QA_BUILDPATHS_SKIP_PATTERN.
- Remove -fdebug-prefix-map in _sysconfigdata.py, Makefile and
python3.5m-config (Python3 only).
[YOCTO #8446]
[YOCTO #7058]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
.../use-relative-path-to-compile-source-file.patch | 31 ++++++++++++++++++++++
.../use-relative-path-to-compile-source-file.patch | 31 ++++++++++++++++++++++
meta/recipes-devtools/python/python3_3.5.1.bb | 10 ++++++-
meta/recipes-devtools/python/python_2.7.11.bb | 8 ++++++
4 files changed, 79 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/python/python/use-relative-path-to-compile-source-file.patch
create mode 100644 meta/recipes-devtools/python/python3/use-relative-path-to-compile-source-file.patch
diff --git a/meta/recipes-devtools/python/python/use-relative-path-to-compile-source-file.patch b/meta/recipes-devtools/python/python/use-relative-path-to-compile-source-file.patch
new file mode 100644
index 0000000..d68ca0c
--- /dev/null
+++ b/meta/recipes-devtools/python/python/use-relative-path-to-compile-source-file.patch
@@ -0,0 +1,31 @@
+From 048a7fef98cb4b8323c0b144c0cc1cdff91c603c Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 23 Feb 2016 21:14:45 -0500
+Subject: [PATCH] use relative path to compile source file
+
+Use relative path rather than absolute path to compile source file.
+This could avoid build path issues.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Lib/distutils/ccompiler.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
+index 82fd7d5..eb86158 100644
+--- a/Lib/distutils/ccompiler.py
++++ b/Lib/distutils/ccompiler.py
+@@ -342,7 +342,7 @@ class CCompiler:
+
+ build = {}
+ for i in range(len(sources)):
+- src = sources[i]
++ src = os.path.relpath(sources[i], '.')
+ obj = objects[i]
+ ext = os.path.splitext(src)[1]
+ self.mkpath(os.path.dirname(obj))
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/python/python3/use-relative-path-to-compile-source-file.patch b/meta/recipes-devtools/python/python3/use-relative-path-to-compile-source-file.patch
new file mode 100644
index 0000000..d68ca0c
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/use-relative-path-to-compile-source-file.patch
@@ -0,0 +1,31 @@
+From 048a7fef98cb4b8323c0b144c0cc1cdff91c603c Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 23 Feb 2016 21:14:45 -0500
+Subject: [PATCH] use relative path to compile source file
+
+Use relative path rather than absolute path to compile source file.
+This could avoid build path issues.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Lib/distutils/ccompiler.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
+index 82fd7d5..eb86158 100644
+--- a/Lib/distutils/ccompiler.py
++++ b/Lib/distutils/ccompiler.py
+@@ -342,7 +342,7 @@ class CCompiler:
+
+ build = {}
+ for i in range(len(sources)):
+- src = sources[i]
++ src = os.path.relpath(sources[i], '.')
+ obj = objects[i]
+ ext = os.path.splitext(src)[1]
+ self.mkpath(os.path.dirname(obj))
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/python/python3_3.5.1.bb b/meta/recipes-devtools/python/python3_3.5.1.bb
index 11f959b..58370f1 100644
--- a/meta/recipes-devtools/python/python3_3.5.1.bb
+++ b/meta/recipes-devtools/python/python3_3.5.1.bb
@@ -37,6 +37,7 @@ SRC_URI += "\
file://setup.py-find-libraries-in-staging-dirs.patch \
file://use_packed_importlib.patch \
file://configure.ac-fix-LIBPL.patch \
+ file://use-relative-path-to-compile-source-file.patch \
"
SRC_URI[md5sum] = "e9ea6f2623fffcdd871b7b19113fde80"
SRC_URI[sha256sum] = "c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9"
@@ -179,6 +180,7 @@ do_install_append_class-nativesdk () {
create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
}
+QA_BUILDPATHS_SKIP_PATTERN ?= "Makefile _sysconfigdata.py"
SSTATE_SCAN_FILES += "Makefile"
PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
@@ -187,8 +189,14 @@ py_package_preprocess () {
install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
# Remove references to buildmachine paths in target Makefile and _sysconfigdata
sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's:-fdebug-prefix-map=${B}=/usr/src/${BPN}::g' \
+ -e 's:-fdebug-prefix-map=${S}=/usr/src/${BPN}::g' \
+ -e 's:-fdebug-prefix-map=${STAGING_DIR_NATIVE}=::g' \
+ -e 's:-fdebug-prefix-map=${STAGING_DIR_HOST}=::g' \
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
- ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+ ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py \
+ ${PKGD}/${bindir}/python${PYTHON_BINABI}-config
+
}
require python-${PYTHON_MAJMIN}-manifest.inc
diff --git a/meta/recipes-devtools/python/python_2.7.11.bb b/meta/recipes-devtools/python/python_2.7.11.bb
index 0c00d6e..3b7c9ec 100644
--- a/meta/recipes-devtools/python/python_2.7.11.bb
+++ b/meta/recipes-devtools/python/python_2.7.11.bb
@@ -27,6 +27,7 @@ SRC_URI += "\
file://use_sysroot_ncurses_instead_of_host.patch \
file://avoid_parallel_make_races_on_pgen.patch \
file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+ file://use-relative-path-to-compile-source-file.patch \
"
S = "${WORKDIR}/Python-${PV}"
@@ -126,6 +127,7 @@ do_install_append_class-nativesdk () {
create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
}
+QA_BUILDPATHS_SKIP_PATTERN ?= "Makefile _sysconfigdata.py"
SSTATE_SCAN_FILES += "Makefile"
PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
@@ -135,8 +137,14 @@ py_package_preprocess () {
# Remove references to buildmachine paths in target Makefile and _sysconfigdata
sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+ -e 's:-fdebug-prefix-map=${B}=/usr/src/${BPN}::g' \
+ -e 's:-fdebug-prefix-map=${S}=/usr/src/${BPN}::g' \
+ -e 's:-fdebug-prefix-map=${STAGING_DIR_NATIVE}=::g' \
+ -e 's:-fdebug-prefix-map=${STAGING_DIR_HOST}=::g' \
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+
+ rm -f ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.pyc
}
require python-${PYTHON_MAJMIN}-manifest.inc
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 09/15] bbclass distutils/distutils3: fix .pyc/.pyo buildpath
2016-02-26 1:44 [PATCH 00/15] fix python buildpaths QA issue Hongxu Jia
2016-02-26 1:44 ` [PATCH 07/15] insane:add buildpaths QA ignore pattern Hongxu Jia
2016-02-26 1:44 ` [PATCH 08/15] python2/3: fix buildpath QA issue Hongxu Jia
@ 2016-02-26 1:44 ` Hongxu Jia
2016-02-26 1:44 ` [PATCH 10/15] python-setuptools/python3-setuptools: use old-style install Hongxu Jia
` (6 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2016-02-26 1:44 UTC (permalink / raw)
To: openembedded-core, liezhi.yang, ross.burton, alejandro.hernandez,
richard.purdie
Get the "--root" directory supplied to the "install" command,
and use it as a prefix to strip off the purported filename
encoded in bytecode files.
Since --root added, we need to tweak --install-data,
--prefix and --install-lib to use relative path.
[YOCTO #8446]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/classes/distutils.bbclass | 6 +++---
meta/classes/distutils3.bbclass | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index cd06713..f054006 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -4,8 +4,8 @@ DISTUTILS_BUILD_ARGS ?= ""
DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
--install-data=${STAGING_DATADIR}"
-DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
- --install-data=${D}/${datadir}"
+DISTUTILS_INSTALL_ARGS ?= "--prefix=${prefix} \
+ --install-data=${datadir}"
distutils_do_compile() {
STAGING_INCDIR=${STAGING_INCDIR} \
@@ -38,7 +38,7 @@ distutils_do_install() {
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --root=${D} --install-lib=${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
bbfatal "${PYTHON_PN} setup.py install execution failed."
# support filenames with *spaces*
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index 443bf3a..7962d40 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -5,8 +5,8 @@ DISTUTILS_BUILD_EXT_ARGS ?= ""
DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
--install-data=${STAGING_DATADIR}"
-DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \
- --install-data=${D}/${datadir}"
+DISTUTILS_INSTALL_ARGS ?= "--prefix=${prefix} \
+ --install-data=${datadir}"
distutils3_do_compile() {
if [ ${BUILD_SYS} != ${HOST_SYS} ]; then
@@ -63,7 +63,7 @@ distutils3_do_install() {
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --root=${D} --install-lib=${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
bbfatal "${PYTHON_PN} setup.py install execution failed."
# support filenames with *spaces*
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 10/15] python-setuptools/python3-setuptools: use old-style install
2016-02-26 1:44 [PATCH 00/15] fix python buildpaths QA issue Hongxu Jia
` (2 preceding siblings ...)
2016-02-26 1:44 ` [PATCH 09/15] bbclass distutils/distutils3: fix .pyc/.pyo buildpath Hongxu Jia
@ 2016-02-26 1:44 ` Hongxu Jia
2016-02-26 1:44 ` [PATCH 11/15] python3-pip: " Hongxu Jia
` (5 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2016-02-26 1:44 UTC (permalink / raw)
To: openembedded-core, liezhi.yang, ross.burton, alejandro.hernandez,
richard.purdie
Since '--root' is added to 'setup.py install' to fix .pyc/.pyo
buildpaths issue. For python setuptools, the '--root' option
means explicit request for old-style install. There will be
no egg generated. And it do not need setuptools.pth any more.
Rename easy_install to easy_install3.
Ubuntu or Debian did the same thing like us:
https://packages.debian.org/sid/all/python3-setuptools/filelist
[YOCTO #8446]
[YOCTO #9162]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/recipes-devtools/python/python-setuptools_19.4.bb | 2 --
meta/recipes-devtools/python/python3-setuptools_19.4.bb | 8 ++------
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/meta/recipes-devtools/python/python-setuptools_19.4.bb b/meta/recipes-devtools/python/python-setuptools_19.4.bb
index c172039..01763d4 100644
--- a/meta/recipes-devtools/python/python-setuptools_19.4.bb
+++ b/meta/recipes-devtools/python/python-setuptools_19.4.bb
@@ -7,8 +7,6 @@ DEPENDS_class-native += "python-native"
inherit distutils
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
-
RDEPENDS_${PN} = "\
python-stringold \
python-email \
diff --git a/meta/recipes-devtools/python/python3-setuptools_19.4.bb b/meta/recipes-devtools/python/python3-setuptools_19.4.bb
index fb2931c..12b0d93 100644
--- a/meta/recipes-devtools/python/python3-setuptools_19.4.bb
+++ b/meta/recipes-devtools/python/python3-setuptools_19.4.bb
@@ -5,13 +5,9 @@ DEPENDS_class-native += "python3-native"
inherit distutils3
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
-
-# The installer puts the wrong path in the setuptools.pth file. Correct it.
+# Rename easy_install to avoid confliction with python2's setuptools
do_install_append() {
- rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
- mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
- echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
+ mv ${D}${bindir}/easy_install ${D}${bindir}/easy_install3
}
RDEPENDS_${PN} = "\
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 11/15] python3-pip: use old-style install
2016-02-26 1:44 [PATCH 00/15] fix python buildpaths QA issue Hongxu Jia
` (3 preceding siblings ...)
2016-02-26 1:44 ` [PATCH 10/15] python-setuptools/python3-setuptools: use old-style install Hongxu Jia
@ 2016-02-26 1:44 ` Hongxu Jia
2016-02-26 1:44 ` [PATCH 12/15] bbclass distutils/distutils3/setuptools/setuptools3: clean up DISTUTILS_INSTALL_ARGS Hongxu Jia
` (4 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2016-02-26 1:44 UTC (permalink / raw)
To: openembedded-core, liezhi.yang, ross.burton, alejandro.hernandez,
richard.purdie
Since '--root' is added to 'setup.py install' to fix .pyc/.pyo
buildpaths issue. For python3-pip, the '--root' option
means there will be no eggs generated.
Ubuntu or Debian did the same thing like us:
https://packages.debian.org/sid/all/python3-pip/filelist
[YOCTO #8446]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/recipes-devtools/python/python3-pip_8.0.0.bb | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/meta/recipes-devtools/python/python3-pip_8.0.0.bb b/meta/recipes-devtools/python/python3-pip_8.0.0.bb
index 834ecda..b45aeea 100644
--- a/meta/recipes-devtools/python/python3-pip_8.0.0.bb
+++ b/meta/recipes-devtools/python/python3-pip_8.0.0.bb
@@ -19,22 +19,10 @@ S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit distutils3
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
-
-do_install_prepend() {
- install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages
-}
-
# Use setuptools site.py instead, avoid shared state issue
do_install_append() {
- rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/site.py
- rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/__pycache__/site.cpython-*.pyc
-
# Install as pip3 and leave pip2 as default
rm ${D}/${bindir}/pip
-
- # Installed eggs need to be passed directly to the interpreter via a pth file
- echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}-${PV}.pth
}
RDEPENDS_${PN} = "\
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 12/15] bbclass distutils/distutils3/setuptools/setuptools3: clean up DISTUTILS_INSTALL_ARGS
2016-02-26 1:44 [PATCH 00/15] fix python buildpaths QA issue Hongxu Jia
` (4 preceding siblings ...)
2016-02-26 1:44 ` [PATCH 11/15] python3-pip: " Hongxu Jia
@ 2016-02-26 1:44 ` Hongxu Jia
2016-02-26 1:45 ` [PATCH 13/15] python-pygobject: fix buildpath QA issue Hongxu Jia
` (3 subsequent siblings)
9 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2016-02-26 1:44 UTC (permalink / raw)
To: openembedded-core, liezhi.yang, ross.burton, alejandro.hernandez,
richard.purdie
Since fix .pyc/.pyo buildpaths issue, we have the same
DISTUTILS_INSTALL_ARGS in these bbclass files, so clean
up the duplicate.
[YOCTO #8446]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/classes/distutils.bbclass | 4 +++-
meta/classes/distutils3.bbclass | 4 +++-
meta/classes/setuptools.bbclass | 5 -----
meta/classes/setuptools3.bbclass | 5 -----
4 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index f054006..18cfb17 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -5,6 +5,8 @@ DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
--install-data=${STAGING_DATADIR}"
DISTUTILS_INSTALL_ARGS ?= "--prefix=${prefix} \
+ --root=${D} \
+ --install-lib=${PYTHON_SITEPACKAGES_DIR} \
--install-data=${datadir}"
distutils_do_compile() {
@@ -38,7 +40,7 @@ distutils_do_install() {
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --root=${D} --install-lib=${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS} || \
bbfatal "${PYTHON_PN} setup.py install execution failed."
# support filenames with *spaces*
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index 7962d40..1e2924a 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -6,6 +6,8 @@ DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}"
DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \
--install-data=${STAGING_DATADIR}"
DISTUTILS_INSTALL_ARGS ?= "--prefix=${prefix} \
+ --root=${D} \
+ --install-lib=${PYTHON_SITEPACKAGES_DIR} \
--install-data=${datadir}"
distutils3_do_compile() {
@@ -63,7 +65,7 @@ distutils3_do_install() {
STAGING_LIBDIR=${STAGING_LIBDIR} \
PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
- ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --root=${D} --install-lib=${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
+ ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_INSTALL_ARGS} || \
bbfatal "${PYTHON_PN} setup.py install execution failed."
# support filenames with *spaces*
diff --git a/meta/classes/setuptools.bbclass b/meta/classes/setuptools.bbclass
index 56343b1..0a3f0f9 100644
--- a/meta/classes/setuptools.bbclass
+++ b/meta/classes/setuptools.bbclass
@@ -1,8 +1,3 @@
inherit distutils
DEPENDS += "python-distribute-native"
-
-DISTUTILS_INSTALL_ARGS = "--root=${D} \
- --prefix=${prefix} \
- --install-lib=${PYTHON_SITEPACKAGES_DIR} \
- --install-data=${datadir}"
diff --git a/meta/classes/setuptools3.bbclass b/meta/classes/setuptools3.bbclass
index de6dd94..38e175a 100644
--- a/meta/classes/setuptools3.bbclass
+++ b/meta/classes/setuptools3.bbclass
@@ -1,8 +1,3 @@
inherit distutils3
DEPENDS += "python3-setuptools-native"
-
-DISTUTILS_INSTALL_ARGS = "--root=${D} \
- --prefix=${prefix} \
- --install-lib=${PYTHON_SITEPACKAGES_DIR} \
- --install-data=${datadir}"
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 13/15] python-pygobject: fix buildpath QA issue
2016-02-26 1:44 [PATCH 00/15] fix python buildpaths QA issue Hongxu Jia
` (5 preceding siblings ...)
2016-02-26 1:44 ` [PATCH 12/15] bbclass distutils/distutils3/setuptools/setuptools3: clean up DISTUTILS_INSTALL_ARGS Hongxu Jia
@ 2016-02-26 1:45 ` Hongxu Jia
2016-03-08 15:24 ` Burton, Ross
2016-02-26 1:45 ` [PATCH 14/15] python-numpy: fix buildpaths " Hongxu Jia
` (2 subsequent siblings)
9 siblings, 1 reply; 16+ messages in thread
From: Hongxu Jia @ 2016-02-26 1:45 UTC (permalink / raw)
To: openembedded-core, liezhi.yang, ross.burton, alejandro.hernandez,
richard.purdie
The variable PYTHON is assigned with native python.
But for target, it caused pygobject-codegen has
build path.
vim ${S}/codegen/pygobject-codegen-2.0.in
[snip]...
exec @PYTHON@ $codegendir/codegen.py "$@"
[snip]...
So we replace it by invoking "which python".
[YOCTO #7058]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
meta/recipes-devtools/python/python-pygobject_2.28.3.bb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/recipes-devtools/python/python-pygobject_2.28.3.bb b/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
index 81d37b4..6082d35 100644
--- a/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
+++ b/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
@@ -51,3 +51,8 @@ FILES_${PN}-lib = "${libdir}/lib*.so.*"
FILES_${PN}-dev += "${bindir} ${datadir}"
BBCLASSEXTEND = "native"
+
+do_install_append_class-target() {
+ sed -i -e "s:${PYTHON}:\`which python\`:g" \
+ ${D}${bindir}/pygobject-codegen-2.0
+}
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 14/15] python-numpy: fix buildpaths QA issue
2016-02-26 1:44 [PATCH 00/15] fix python buildpaths QA issue Hongxu Jia
` (6 preceding siblings ...)
2016-02-26 1:45 ` [PATCH 13/15] python-pygobject: fix buildpath QA issue Hongxu Jia
@ 2016-02-26 1:45 ` Hongxu Jia
2016-02-26 1:45 ` [PATCH 15/15] python-pycairo: fix buildpath " Hongxu Jia
2016-03-09 1:11 ` [PATCH 00/15] fix python buildpaths " Hongxu Jia
9 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2016-02-26 1:45 UTC (permalink / raw)
To: openembedded-core, liezhi.yang, ross.burton, alejandro.hernandez,
richard.purdie
Remove build path in comments:
Without the fix:
...
|This file is generated by /buildarea/raid0/hjia/build-20160225-yocto-
buildpath/tmp/work/core2-64-poky-linux/python-numpy/1.10.4-r0/numpy
-1.10.4/setup.py
...
With the fix:
...
|This file is generated by /numpy-1.10.4/setup.py
...
[YOCTO #7058]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
| 30 ++++++++++++++++++++++
.../recipes-devtools/python/python-numpy_1.10.4.bb | 1 +
2 files changed, 31 insertions(+)
create mode 100644 meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch
--git a/meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch b/meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch
new file mode 100644
index 0000000..eb8a71a
--- /dev/null
+++ b/meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch
@@ -0,0 +1,30 @@
+From c560abff71f98a39a7401f08c2c13dad9ae7f15f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 25 Feb 2016 01:23:32 -0500
+Subject: [PATCH] remove build path in comments
+
+It has build path in comments, so remove it.
+
+Upstream-Status: Inappropriate [openembedded specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ numpy/distutils/misc_util.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
+index 345e60f..dafb068 100644
+--- a/numpy/distutils/misc_util.py
++++ b/numpy/distutils/misc_util.py
+@@ -2254,7 +2254,7 @@ def generate_config_py(target):
+ from distutils.dir_util import mkpath
+ mkpath(os.path.dirname(target))
+ f = open(target, 'w')
+- f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0])))
++ f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0]).replace(os.path.abspath('../'),'')))
+ f.write('# It contains system_info results at the time of building this package.\n')
+ f.write('__all__ = ["get_info","show"]\n\n')
+ for k, i in system_info.saved_results.items():
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/python/python-numpy_1.10.4.bb b/meta/recipes-devtools/python/python-numpy_1.10.4.bb
index 01bf9fb..fa651cb 100644
--- a/meta/recipes-devtools/python/python-numpy_1.10.4.bb
+++ b/meta/recipes-devtools/python/python-numpy_1.10.4.bb
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9f4e88b5748e8313caaf33d081ce65a3"
SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \
file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
+ file://remove-build-path-in-comments.patch \
${CONFIGFILESURI} "
CONFIGFILESURI ?= ""
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 15/15] python-pycairo: fix buildpath QA issue
2016-02-26 1:44 [PATCH 00/15] fix python buildpaths QA issue Hongxu Jia
` (7 preceding siblings ...)
2016-02-26 1:45 ` [PATCH 14/15] python-numpy: fix buildpaths " Hongxu Jia
@ 2016-02-26 1:45 ` Hongxu Jia
2016-03-08 15:26 ` Burton, Ross
2016-03-09 1:11 ` [PATCH 00/15] fix python buildpaths " Hongxu Jia
9 siblings, 1 reply; 16+ messages in thread
From: Hongxu Jia @ 2016-02-26 1:45 UTC (permalink / raw)
To: openembedded-core, liezhi.yang, ross.burton, alejandro.hernandez,
richard.purdie
- Append function unpack_waf to do_unpack to do self-extracting first,
we need to patch on the extracted files.
- Get "--destdir" directory supplied to the "install" command,
and use it as a prefix to strip off the purported filename
encoded in bytecode files.
- Do not need to generate pycairo.pc manually
[YOCTO #8446]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
...trip-off-build-path-in-purported-filename.patch | 62 ++++++++++++++++++++++
.../python/python-pycairo_1.10.0.bb | 22 ++++----
2 files changed, 75 insertions(+), 9 deletions(-)
create mode 100644 meta/recipes-devtools/python/python-pycairo/strip-off-build-path-in-purported-filename.patch
diff --git a/meta/recipes-devtools/python/python-pycairo/strip-off-build-path-in-purported-filename.patch b/meta/recipes-devtools/python/python-pycairo/strip-off-build-path-in-purported-filename.patch
new file mode 100644
index 0000000..647c4be
--- /dev/null
+++ b/meta/recipes-devtools/python/python-pycairo/strip-off-build-path-in-purported-filename.patch
@@ -0,0 +1,62 @@
+From 86faf604fc8a7f17320db48734cda464119da387 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 25 Feb 2016 04:22:07 -0500
+Subject: [PATCH] strip off build path in purported filename
+
+Get the "--destdir" directory supplied to the "install" command,
+and use it as a prefix to strip off the purported filename
+encoded in bytecode files.
+
+Upstream-Status: Inappropriate [openembedded specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+diff --git a/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Tools/python.py b/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Tools/python.py
+--- a/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Tools/python.py
++++ b/.waf-1.6.3-3c3129a3ec8fb4a5bbc7ba3161463b22/waflib/Tools/python.py
+@@ -26,7 +26,7 @@ int main()
+ INST='''
+ import sys, py_compile
+ for pyfile in sys.argv[1:]:
+- py_compile.compile(pyfile, pyfile + %r)
++ py_compile.compile(pyfile, pyfile + %r, %r)
+ '''
+ def process_py(self,node):
+ try:
+@@ -39,6 +39,16 @@ def process_py(self,node):
+ def inst_py(ctx):
+ install_pyfile(self,node)
+ self.bld.add_post_fun(inst_py)
++
++def get_dfile(dfile):
++ if getattr(Options.options,'destdir'):
++ destdir = Options.options.destdir
++ if dfile[:len(destdir)] != destdir:
++ raise Errors.WafError("invalid destdir: filename %r doesn't start with %r" % ((dfile, destdir)))
++ dfile = dfile[len(destdir):]
++
++ return dfile
++
+ def install_pyfile(self,node):
+ tsk=self.bld.install_files(self.install_path,[node],postpone=False)
+ path=os.path.join(tsk.get_install_path(),node.name)
+@@ -53,12 +63,14 @@ def install_pyfile(self,node):
+ if self.env['PYC']or self.env['PYO']:
+ info("+ byte compiling %r"%path)
+ if self.env['PYC']:
+- argv=self.env['PYTHON']+['-c',INST%'c',path]
++ dfile = get_dfile(path+'c')
++ argv=self.env['PYTHON']+['-c',INST%('c',dfile),path]
+ ret=Utils.subprocess.Popen(argv).wait()
+ if ret:
+ raise Errors.WafError('pyc compilation failed %r'%path)
+ if self.env['PYO']:
+- argv=self.env['PYTHON']+[self.env['PYFLAGS_OPT'],'-c',INST%'o',path]
++ dfile = get_dfile(path+'o')
++ argv=self.env['PYTHON']+[self.env['PYFLAGS_OPT'],'-c',INST%('o',dfile),path]
+ ret=Utils.subprocess.Popen(argv).wait()
+ if ret:
+ raise Errors.WafError('pyo compilation failed %r'%path)
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/python/python-pycairo_1.10.0.bb b/meta/recipes-devtools/python/python-pycairo_1.10.0.bb
index 70fe25c..90a1701 100644
--- a/meta/recipes-devtools/python/python-pycairo_1.10.0.bb
+++ b/meta/recipes-devtools/python/python-pycairo_1.10.0.bb
@@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421 \
DEPENDS = "cairo"
PR = "r2"
-SRC_URI = "http://cairographics.org/releases/py2cairo-${PV}.tar.bz2"
+SRC_URI = "http://cairographics.org/releases/py2cairo-${PV}.tar.bz2 \
+ file://strip-off-build-path-in-purported-filename.patch \
+"
SRC_URI[md5sum] = "20337132c4ab06c1146ad384d55372c5"
SRC_URI[sha256sum] = "d30439f06c2ec1a39e27464c6c828b6eface3b22ee17b2de05dc409e429a7431"
@@ -22,8 +24,16 @@ inherit distutils pkgconfig
BBCLASSEXTEND = "native"
+do_unpack[postfuncs] += "unpack_waf"
+do_unpack[vardeps] += "unpack_waf"
+unpack_waf() {
+ # Just self extract tarball embedded in waf, do not care help message.
+ # Do not generate bytecode, becuase we need to patch python file later
+ PYTHONDONTWRITEBYTECODE=True ./waf --help >/dev/null
+}
+
do_configure() {
- BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} ./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir}
+ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} ./waf configure --prefix=${prefix} --libdir=${libdir}
}
do_compile() {
@@ -31,11 +41,5 @@ do_compile() {
}
do_install() {
- ./waf install
- sed \
- -e 's:@prefix@:${prefix}:' \
- -e 's:@VERSION@:${PV}:' \
- -e 's:@includedir@:${includedir}:' \
- pycairo.pc.in > pycairo.pc
- install -m 0644 pycairo.pc ${D}${libdir}/pkgconfig/
+ ./waf install --destdir=${D}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 13/15] python-pygobject: fix buildpath QA issue
2016-02-26 1:45 ` [PATCH 13/15] python-pygobject: fix buildpath QA issue Hongxu Jia
@ 2016-03-08 15:24 ` Burton, Ross
2016-03-08 15:27 ` Alexander Kanavin
2016-03-09 1:07 ` Hongxu Jia
0 siblings, 2 replies; 16+ messages in thread
From: Burton, Ross @ 2016-03-08 15:24 UTC (permalink / raw)
To: Hongxu Jia; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 456 bytes --]
On 26 February 2016 at 01:45, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> +do_install_append_class-target() {
> + sed -i -e "s:${PYTHON}:\`which python\`:g" \
> + ${D}${bindir}/pygobject-codegen-2.0
> +}
>
If you're going to expect the shell to find the right python on the target
there's no need to use `which python` as exec will search $PATH. However,
we do know where Python on the target it: ${bindir}/python.
Ross
[-- Attachment #2: Type: text/html, Size: 896 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 15/15] python-pycairo: fix buildpath QA issue
2016-02-26 1:45 ` [PATCH 15/15] python-pycairo: fix buildpath " Hongxu Jia
@ 2016-03-08 15:26 ` Burton, Ross
2016-03-09 1:05 ` Hongxu Jia
0 siblings, 1 reply; 16+ messages in thread
From: Burton, Ross @ 2016-03-08 15:26 UTC (permalink / raw)
To: Hongxu Jia; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 838 bytes --]
On 26 February 2016 at 01:45, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> +do_unpack[postfuncs] += "unpack_waf"
> +do_unpack[vardeps] += "unpack_waf"
> +unpack_waf() {
> + # Just self extract tarball embedded in waf, do not care help
> message.
> + # Do not generate bytecode, becuase we need to patch python file
> later
> + PYTHONDONTWRITEBYTECODE=True ./waf --help >/dev/null
> +}
>
Presumably this isn't pycairo-specific but impacts every recipe using waf?
> do_configure() {
> - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} ./waf configure
> --prefix=${D}${prefix} --libdir=${D}${libdir}
> + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} ./waf configure
> --prefix=${prefix} --libdir=${libdir}
> }
>
Looks like this recipe needs to use the waf class for a start.
Ross
[-- Attachment #2: Type: text/html, Size: 1502 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 13/15] python-pygobject: fix buildpath QA issue
2016-03-08 15:24 ` Burton, Ross
@ 2016-03-08 15:27 ` Alexander Kanavin
2016-03-09 1:07 ` Hongxu Jia
1 sibling, 0 replies; 16+ messages in thread
From: Alexander Kanavin @ 2016-03-08 15:27 UTC (permalink / raw)
To: openembedded-core
On 03/08/2016 05:24 PM, Burton, Ross wrote:
> +do_install_append_class-target() {
> + sed -i -e "s:${PYTHON}:\`which python\`:g" \
> + ${D}${bindir}/pygobject-codegen-2.0
> +}
>
>
> If you're going to expect the shell to find the right python on the
> target there's no need to use `which python` as exec will search $PATH.
> However, we do know where Python on the target it: ${bindir}/python.
pygobject 3.x (which replaces 2.x as a part of introspection series)
does not contain this script anymore, so the patch is moot anyway.
Alex
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 15/15] python-pycairo: fix buildpath QA issue
2016-03-08 15:26 ` Burton, Ross
@ 2016-03-09 1:05 ` Hongxu Jia
0 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2016-03-09 1:05 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]
On 03/08/2016 11:26 PM, Burton, Ross wrote:
>
> On 26 February 2016 at 01:45, Hongxu Jia <hongxu.jia@windriver.com
> <mailto:hongxu.jia@windriver.com>> wrote:
>
> +do_unpack[postfuncs] += "unpack_waf"
> +do_unpack[vardeps] += "unpack_waf"
> +unpack_waf() {
> + # Just self extract tarball embedded in waf, do not care
> help message.
> + # Do not generate bytecode, becuase we need to patch
> python file later
> + PYTHONDONTWRITEBYTECODE=True ./waf --help >/dev/null
> +}
>
>
> Presumably this isn't pycairo-specific but impacts every recipe using waf?
>
> do_configure() {
> - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} ./waf
> configure --prefix=${D}${prefix} --libdir=${D}${libdir}
> + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} ./waf
> configure --prefix=${prefix} --libdir=${libdir}
> }
>
>
> Looks like this recipe needs to use the waf class for a start.
>
OK, I will try to merge these to waf.bbclass. V2 Incoming
//Hongxu
> Ross
[-- Attachment #2: Type: text/html, Size: 2903 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 13/15] python-pygobject: fix buildpath QA issue
2016-03-08 15:24 ` Burton, Ross
2016-03-08 15:27 ` Alexander Kanavin
@ 2016-03-09 1:07 ` Hongxu Jia
1 sibling, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2016-03-09 1:07 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 646 bytes --]
On 03/08/2016 11:24 PM, Burton, Ross wrote:
>
> On 26 February 2016 at 01:45, Hongxu Jia <hongxu.jia@windriver.com
> <mailto:hongxu.jia@windriver.com>> wrote:
>
> +do_install_append_class-target() {
> + sed -i -e "s:${PYTHON}:\`which python\`:g" \
> + ${D}${bindir}/pygobject-codegen-2.0
> +}
>
>
> If you're going to expect the shell to find the right python on the
> target there's no need to use `which python` as exec will search
> $PATH. However, we do know where Python on the target it:
> ${bindir}/python.
>
OK, I directly use '${bindir}/python' to instead.
//Hongxu
> Ross
[-- Attachment #2: Type: text/html, Size: 1968 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 00/15] fix python buildpaths QA issue
2016-02-26 1:44 [PATCH 00/15] fix python buildpaths QA issue Hongxu Jia
` (8 preceding siblings ...)
2016-02-26 1:45 ` [PATCH 15/15] python-pycairo: fix buildpath " Hongxu Jia
@ 2016-03-09 1:11 ` Hongxu Jia
9 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2016-03-09 1:11 UTC (permalink / raw)
To: openembedded-core, liezhi.yang, ross.burton, alejandro.hernandez,
richard.purdie
As Richard suggested ( see [YOCTO #9169]), I will drop
'insane:add buildpaths QA ignore pattern'
So please drop these, V2 incoming
//Hongxu
On 02/26/2016 09:44 AM, Hongxu Jia wrote:
> - Patch 01-06 has be sent in previous pull request.
>
> - add buildpaths QA ignore pattern, and ignore Makefile by default
>
> - fix .pyc/.pyo buildpath QA issue
>
> - fix python related buildpath QA issue
>
> Test Steps:
>
> vim local.conf
> ...
> MACHINE ?= "qemux86-64"
> WARN_QA += "buildpaths"
> require conf/multilib.conf
> MULTILIBS = "multilib:lib32"
> DEFAULTTUNE_virtclass-multilib-lib32 = "core2-32"
> ...
>
> bitbake -k world
>
> In oe-core, these patches fixed 40+ recipes' buildpath QA issue,
> and fixed all python related buildpath QA issue.
>
> There are still 55 recipes left that has buildpath QA issue.
>
> //Hongxu
>
> The following changes since commit 23056103c949b498c23b47579e8dd57ce78e6ed9:
>
> uclibc: Do not use immediate expansion operator (2016-02-22 20:42:48 +0000)
>
> are available in the git repository at:
>
> git://git.openembedded.org/openembedded-core-contrib hongxu/fix-buildpath
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=hongxu/fix-buildpath
>
> Hongxu Jia (15):
> depmodwrapper-cross: nopackages to avoid QA [buildpaths] issue
> gcc: use relative path for configure script
> bison/gettext: add --with-bisonlocaledir to assign BISON_LOCALEDIR
> openssl: substitute buildpath in source code
> btrfs-tools: fix symlink creation multiple times
> git: fix installed-vs-shipped QA Issue
> insane:add buildpaths QA ignore pattern
> python2/3: fix buildpath QA issue
> bbclass distutils/distutils3: fix .pyc/.pyo buildpath
> python-setuptools/python3-setuptools: use old-style install
> python3-pip: use old-style install
> bbclass distutils/distutils3/setuptools/setuptools3: clean up
> DISTUTILS_INSTALL_ARGS
> python-pygobject: fix buildpath QA issue
> python-numpy: fix buildpaths QA issue
> python-pycairo: fix buildpath QA issue
>
> meta/classes/distutils.bbclass | 8 +--
> meta/classes/distutils3.bbclass | 8 +--
> meta/classes/insane.bbclass | 13 +++++
> meta/classes/setuptools.bbclass | 5 --
> meta/classes/setuptools3.bbclass | 5 --
> meta/recipes-connectivity/openssl/openssl.inc | 2 +-
> .../substitute-buildpath-in-source-code.patch | 41 ++++++++++++++
> .../recipes-connectivity/openssl/openssl_1.0.2f.bb | 1 +
> .../gettext-0.19.6/add-with-bisonlocaledir.patch | 58 ++++++++++++++++++++
> meta/recipes-core/gettext/gettext_0.19.6.bb | 4 ++
> .../bison/bison/add-with-bisonlocaledir.patch | 58 ++++++++++++++++++++
> meta/recipes-devtools/bison/bison_3.0.4.bb | 1 +
> .../fix-symlink-creation-multiple-times.patch | 46 ++++++++++++++++
> .../btrfs-tools/btrfs-tools_4.4.bb | 1 +
> meta/recipes-devtools/gcc/gcc-runtime.inc | 3 +-
> meta/recipes-devtools/gcc/gcc-sanitizers.inc | 3 +-
> meta/recipes-devtools/gcc/libgcc-common.inc | 3 +-
> meta/recipes-devtools/gcc/libgfortran.inc | 3 +-
> meta/recipes-devtools/git/git.inc | 2 +
> .../remove-build-path-in-comments.patch | 30 +++++++++++
> .../recipes-devtools/python/python-numpy_1.10.4.bb | 1 +
> ...trip-off-build-path-in-purported-filename.patch | 62 ++++++++++++++++++++++
> .../python/python-pycairo_1.10.0.bb | 22 ++++----
> .../python/python-pygobject_2.28.3.bb | 5 ++
> .../python/python-setuptools_19.4.bb | 2 -
> .../use-relative-path-to-compile-source-file.patch | 31 +++++++++++
> meta/recipes-devtools/python/python3-pip_8.0.0.bb | 12 -----
> .../python/python3-setuptools_19.4.bb | 8 +--
> .../use-relative-path-to-compile-source-file.patch | 31 +++++++++++
> meta/recipes-devtools/python/python3_3.5.1.bb | 10 +++-
> meta/recipes-devtools/python/python_2.7.11.bb | 8 +++
> .../recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 2 +
> 32 files changed, 438 insertions(+), 51 deletions(-)
> create mode 100644 meta/recipes-connectivity/openssl/openssl/substitute-buildpath-in-source-code.patch
> create mode 100644 meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch
> create mode 100644 meta/recipes-devtools/bison/bison/add-with-bisonlocaledir.patch
> create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch
> create mode 100644 meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch
> create mode 100644 meta/recipes-devtools/python/python-pycairo/strip-off-build-path-in-purported-filename.patch
> create mode 100644 meta/recipes-devtools/python/python/use-relative-path-to-compile-source-file.patch
> create mode 100644 meta/recipes-devtools/python/python3/use-relative-path-to-compile-source-file.patch
>
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2016-03-09 1:11 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-26 1:44 [PATCH 00/15] fix python buildpaths QA issue Hongxu Jia
2016-02-26 1:44 ` [PATCH 07/15] insane:add buildpaths QA ignore pattern Hongxu Jia
2016-02-26 1:44 ` [PATCH 08/15] python2/3: fix buildpath QA issue Hongxu Jia
2016-02-26 1:44 ` [PATCH 09/15] bbclass distutils/distutils3: fix .pyc/.pyo buildpath Hongxu Jia
2016-02-26 1:44 ` [PATCH 10/15] python-setuptools/python3-setuptools: use old-style install Hongxu Jia
2016-02-26 1:44 ` [PATCH 11/15] python3-pip: " Hongxu Jia
2016-02-26 1:44 ` [PATCH 12/15] bbclass distutils/distutils3/setuptools/setuptools3: clean up DISTUTILS_INSTALL_ARGS Hongxu Jia
2016-02-26 1:45 ` [PATCH 13/15] python-pygobject: fix buildpath QA issue Hongxu Jia
2016-03-08 15:24 ` Burton, Ross
2016-03-08 15:27 ` Alexander Kanavin
2016-03-09 1:07 ` Hongxu Jia
2016-02-26 1:45 ` [PATCH 14/15] python-numpy: fix buildpaths " Hongxu Jia
2016-02-26 1:45 ` [PATCH 15/15] python-pycairo: fix buildpath " Hongxu Jia
2016-03-08 15:26 ` Burton, Ross
2016-03-09 1:05 ` Hongxu Jia
2016-03-09 1:11 ` [PATCH 00/15] fix python buildpaths " Hongxu Jia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox