* [PATCH 2/3] python: remove the PN package entirely
2018-10-12 11:55 [PATCH 1/3] python: don't wipe RDEPENDS when parsing manifest Ross Burton
@ 2018-10-12 11:55 ` Ross Burton
2018-10-13 7:10 ` Khem Raj
2018-10-12 11:55 ` [PATCH 3/3] python: clean up ptest Ross Burton
2018-10-14 8:49 ` [PATCH 1/3] python: don't wipe RDEPENDS when parsing manifest Richard Purdie
2 siblings, 1 reply; 6+ messages in thread
From: Ross Burton @ 2018-10-12 11:55 UTC (permalink / raw)
To: openembedded-core
Nothing should be in this package, so remove it entirely to be sure nothing does
end up in there.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/recipes-devtools/python/python3_3.5.6.bb | 4 ++--
meta/recipes-devtools/python/python_2.7.15.bb | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-devtools/python/python3_3.5.6.bb b/meta/recipes-devtools/python/python3_3.5.6.bb
index 489baa294fd..95915447ab4 100644
--- a/meta/recipes-devtools/python/python3_3.5.6.bb
+++ b/meta/recipes-devtools/python/python3_3.5.6.bb
@@ -214,6 +214,8 @@ py_package_preprocess () {
mv ${PKGD}/${bindir}/python${PYTHON_BINABI}-config ${PKGD}/${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}
}
+PACKAGES_remove = "${PN}"
+
# manual dependency additions
RPROVIDES_${PN}-modules = "${PN}"
RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python3-modules"
@@ -244,8 +246,6 @@ FILES_${PN}-man = "${datadir}/man"
BBCLASSEXTEND = "nativesdk"
-RPROVIDES_${PN} += "${PN}-modules"
-
# We want bytecode precompiled .py files (.pyc's) by default
# but the user may set it on their own conf
INCLUDE_PYCS ?= "1"
diff --git a/meta/recipes-devtools/python/python_2.7.15.bb b/meta/recipes-devtools/python/python_2.7.15.bb
index f30d3f4d25c..9bf6959a0c5 100644
--- a/meta/recipes-devtools/python/python_2.7.15.bb
+++ b/meta/recipes-devtools/python/python_2.7.15.bb
@@ -152,6 +152,7 @@ py_package_preprocess () {
(cd ${PKGD}; python -m py_compile ./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py)
}
+PACKAGES_remove = "${PN}"
# manual dependency additions
RPROVIDES_${PN}-core = "${PN}"
@@ -199,8 +200,6 @@ RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', ''
BBCLASSEXTEND = "nativesdk"
-RPROVIDES_${PN} += "${PN}-modules"
-
# We want bytecode precompiled .py files (.pyc's) by default
# but the user may set it on their own conf
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] python: remove the PN package entirely
2018-10-12 11:55 ` [PATCH 2/3] python: remove the PN package entirely Ross Burton
@ 2018-10-13 7:10 ` Khem Raj
2018-10-13 10:23 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2018-10-13 7:10 UTC (permalink / raw)
To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer
I am seeing core-image-sato-sdk-ptest fail to build with errors like
http://errors.yoctoproject.org/Errors/Build/69750/
http://errors.yoctoproject.org/Errors/Build/69747/
So taking a wild guess, this series might be one causing it.
On Fri, Oct 12, 2018 at 4:55 AM Ross Burton <ross.burton@intel.com> wrote:
>
> Nothing should be in this package, so remove it entirely to be sure nothing does
> end up in there.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
> meta/recipes-devtools/python/python3_3.5.6.bb | 4 ++--
> meta/recipes-devtools/python/python_2.7.15.bb | 3 +--
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/meta/recipes-devtools/python/python3_3.5.6.bb b/meta/recipes-devtools/python/python3_3.5.6.bb
> index 489baa294fd..95915447ab4 100644
> --- a/meta/recipes-devtools/python/python3_3.5.6.bb
> +++ b/meta/recipes-devtools/python/python3_3.5.6.bb
> @@ -214,6 +214,8 @@ py_package_preprocess () {
> mv ${PKGD}/${bindir}/python${PYTHON_BINABI}-config ${PKGD}/${bindir}/python${PYTHON_BINABI}-config-${MULTILIB_SUFFIX}
> }
>
> +PACKAGES_remove = "${PN}"
> +
> # manual dependency additions
> RPROVIDES_${PN}-modules = "${PN}"
> RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python3-modules"
> @@ -244,8 +246,6 @@ FILES_${PN}-man = "${datadir}/man"
>
> BBCLASSEXTEND = "nativesdk"
>
> -RPROVIDES_${PN} += "${PN}-modules"
> -
> # We want bytecode precompiled .py files (.pyc's) by default
> # but the user may set it on their own conf
> INCLUDE_PYCS ?= "1"
> diff --git a/meta/recipes-devtools/python/python_2.7.15.bb b/meta/recipes-devtools/python/python_2.7.15.bb
> index f30d3f4d25c..9bf6959a0c5 100644
> --- a/meta/recipes-devtools/python/python_2.7.15.bb
> +++ b/meta/recipes-devtools/python/python_2.7.15.bb
> @@ -152,6 +152,7 @@ py_package_preprocess () {
> (cd ${PKGD}; python -m py_compile ./${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py)
> }
>
> +PACKAGES_remove = "${PN}"
>
> # manual dependency additions
> RPROVIDES_${PN}-core = "${PN}"
> @@ -199,8 +200,6 @@ RDEPENDS_${PN}-modules_remove = "${@bb.utils.contains('PACKAGECONFIG', 'bdb', ''
>
> BBCLASSEXTEND = "nativesdk"
>
> -RPROVIDES_${PN} += "${PN}-modules"
> -
> # We want bytecode precompiled .py files (.pyc's) by default
> # but the user may set it on their own conf
>
> --
> 2.11.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] python: clean up ptest
2018-10-12 11:55 [PATCH 1/3] python: don't wipe RDEPENDS when parsing manifest Ross Burton
2018-10-12 11:55 ` [PATCH 2/3] python: remove the PN package entirely Ross Burton
@ 2018-10-12 11:55 ` Ross Burton
2018-10-14 8:49 ` [PATCH 1/3] python: don't wipe RDEPENDS when parsing manifest Richard Purdie
2 siblings, 0 replies; 6+ messages in thread
From: Ross Burton @ 2018-10-12 11:55 UTC (permalink / raw)
To: openembedded-core
As the manifest handling is done differently now, just inherit ptest with the
other inherits.
test_shutil needs unzip so add to RDEPENDS.
Instead of using a patched Makefile, call test.regrtest directly.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
.../python/python/fix-makefile-for-ptest.patch | 34 ----------------------
meta/recipes-devtools/python/python/run-ptest | 4 +--
meta/recipes-devtools/python/python_2.7.15.bb | 25 ++--------------
3 files changed, 3 insertions(+), 60 deletions(-)
delete mode 100644 meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
diff --git a/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch b/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
deleted file mode 100644
index 60d782cd26b..00000000000
--- a/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Add 'build-test' and 'runtest-TESTS' targets to Makefile, to build and run tests
-cross-compiled.
-
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-Upstream-Status: Pending
----
-Index: Python-2.7.14/Makefile.pre.in
-===================================================================
---- Python-2.7.14.orig/Makefile.pre.in
-+++ Python-2.7.14/Makefile.pre.in
-@@ -846,14 +846,19 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
-
- .PHONY: test testall testuniversal buildbottest pythoninfo
-
--TESTOPTS= -l $(EXTRATESTOPTS)
-+TESTOPTS= -l -v $(EXTRATESTOPTS)
- TESTPROG= $(srcdir)/Lib/test/regrtest.py
--TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
--test: @DEF_MAKE_RULE@ platform
-- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
-+TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
-+test: build-test
-+ $(MAKE) runtest-TESTS
-+
-+runtest-TESTS:
-+ -find $(srcdir) -name '*.py[co]' -print | xargs rm -f
- -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
- $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-
-+build-test: @DEF_MAKE_RULE@ platform
-+
- testall: @DEF_MAKE_RULE@ platform
- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
- $(TESTPYTHON) $(srcdir)/Lib/compileall.py
diff --git a/meta/recipes-devtools/python/python/run-ptest b/meta/recipes-devtools/python/python/run-ptest
index a2f9eed4441..832551a1244 100644
--- a/meta/recipes-devtools/python/python/run-ptest
+++ b/meta/recipes-devtools/python/python/run-ptest
@@ -1,5 +1,3 @@
#!/bin/sh
-#
-#This script is used to run python test suites
-make -f LIBDIR/python/ptest/Makefile -k runtest-TESTS srcdir=LIBDIR/python2.7 TESTPROG=LIBDIR/python2.7/test/regrtest.py | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
+python -m test.regrtest -v | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
diff --git a/meta/recipes-devtools/python/python_2.7.15.bb b/meta/recipes-devtools/python/python_2.7.15.bb
index 9bf6959a0c5..7662b165372 100644
--- a/meta/recipes-devtools/python/python_2.7.15.bb
+++ b/meta/recipes-devtools/python/python_2.7.15.bb
@@ -24,7 +24,6 @@ SRC_URI += "\
file://avoid_warning_about_tkinter.patch \
file://avoid_warning_for_sunos_specific_module.patch \
file://python-2.7.3-remove-bsdb-rpath.patch \
- file://fix-makefile-for-ptest.patch \
file://run-ptest \
file://parallel-makeinst-create-bindir.patch \
file://use_sysroot_ncurses_instead_of_host.patch \
@@ -35,7 +34,7 @@ SRC_URI += "\
S = "${WORKDIR}/Python-${PV}"
-inherit autotools multilib_header python-dir pythonnative
+inherit autotools multilib_header python-dir pythonnative ptest
CONFIGUREOPTS += " --with-system-ffi "
@@ -169,27 +168,7 @@ FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
RDEPENDS_${PN}-modules += "${PN}-misc"
# ptest
-RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
-#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
-inherit ptest
-
-# This must come after inherit ptest for the override to take effect
-do_install_ptest() {
- cp ${B}/Makefile ${D}${PTEST_PATH}
- sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
- -e s:LIBDIR:${libdir}:g \
- -i ${D}${PTEST_PATH}/run-ptest
-
- #Remove build host references
- sed -i \
- -e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
- -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
- -e 's:${HOSTTOOLS_DIR}/::g' \
- -e 's:${RECIPE_SYSROOT}::g' \
- -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
- ${D}/${PTEST_PATH}/Makefile
-}
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip"
# catch manpage
PACKAGES += "${PN}-man"
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3] python: don't wipe RDEPENDS when parsing manifest
2018-10-12 11:55 [PATCH 1/3] python: don't wipe RDEPENDS when parsing manifest Ross Burton
2018-10-12 11:55 ` [PATCH 2/3] python: remove the PN package entirely Ross Burton
2018-10-12 11:55 ` [PATCH 3/3] python: clean up ptest Ross Burton
@ 2018-10-14 8:49 ` Richard Purdie
2 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2018-10-14 8:49 UTC (permalink / raw)
To: Ross Burton, openembedded-core
On Fri, 2018-10-12 at 12:55 +0100, Ross Burton wrote:
> We want to allow the main recipe to extend RDEPENDS directly, so
> don't wipe
> RDEPENDS when reading the manifest.
>
> This fixes the missing python-misc dependency from python-modules.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
> meta/recipes-devtools/python/python3_3.5.6.bb | 1 -
> meta/recipes-devtools/python/python_2.7.15.bb | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/python/python3_3.5.6.bb
> b/meta/recipes-devtools/python/python3_3.5.6.bb
> index e1796581342..489baa294fd 100644
> --- a/meta/recipes-devtools/python/python3_3.5.6.bb
> +++ b/meta/recipes-devtools/python/python3_3.5.6.bb
> @@ -285,7 +285,6 @@ python(){
> for value in python_manifest[key]['cached']:
> d.appendVar('FILES_' + pypackage, ' ' + value)
>
> - d.setVar('RDEPENDS_' + pypackage, '')
> for value in python_manifest[key]['rdepends']:
> # Make it work with or without $PN
> if '${PN}' in value:
> diff --git a/meta/recipes-devtools/python/python_2.7.15.bb
> b/meta/recipes-devtools/python/python_2.7.15.bb
> index 472c1da4bf7..f30d3f4d25c 100644
> --- a/meta/recipes-devtools/python/python_2.7.15.bb
> +++ b/meta/recipes-devtools/python/python_2.7.15.bb
> @@ -240,7 +240,6 @@ python(){
> if value.endswith('.py'):
> d.appendVar('FILES_' + pypackage, ' ' + value +
> 'c')
>
> - d.setVar('RDEPENDS_' + pypackage, '')
> for value in python_manifest[key]['rdepends']:
> # Make it work with or without $PN
> if '${PN}' in value:
FWIW its actually this patch which is causing the build failures...
I did remember that rpm may detect python scripts and add a python
dependency which may be confusing things...
Cheers,
Richard
^ permalink raw reply [flat|nested] 6+ messages in thread