Skip to contentSkip to conversation

Switch oe-core to Python 3

PATCH New Alexander Kanavin 1 participant 32 messages Jun 2, 2016

lore
Share & tools
lore
#0 lore raw

cover Switch oe-core to Python 3

This is an updated and rebased patchset that switches oe-core recipes to Python 3 whenever possible. See here for an overview:
http://lists.openembedded.org/pipermail/openembedded-core/2016-May/121915.html

Changes:
- fixed issues found via autobuilder testing: gdbus-codegen issue and python3-dbus issue are fixed explicitly; python3-numpy failure has disappeared somewhere between rebasing and fixing those other items:
http://lists.openembedded.org/pipermail/openembedded-core/2016-May/122257.html

The following changes since commit 3c42280b8a5cac184311a59589849fec4e215a14:

sanity: Drop setting C locale (2016-06-01 15:05:47 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib akanavin/deprecate-python2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/deprecate-python2

Alexander Kanavin (31):
bind: switch Python dependency to Python 3.x
python-dbus: update to 1.2.4, port to python 3
python3: drop 110-enable-zlib.patch
glib: move to Python 3
dbus-test: remove unneeded pygobject dependency
python-pygobject: port to Python 3
neard: do not package python test scripts
bluez5: switch to Python 3
connman: do not install Python test scripts
ofono: drop the custom-made revert to Python 2 from Python 3 packagegroup-core-full-cmdline: drop python-dbus from the list of
services
nfs-utils: switch to Python 3
systemd: drop python dependency for ptests
util-linux: move to Python 3
python-pycairo: move to Python 3
bootchart2: move to Python 3
gdb: move to Python 3
swig: move to Python 3
python-pyrex: remove unused recipe
python-imaging: remove unused recipe
python-docutils: move to Python 3
libuser: move to Python 3
libnewt-python: move to Python 3
gnome-doc-utils: remove recipe
lttng-tools: move to Python 3
lttng-ust: move to Python 3
systemtap: move to Python 3
libcap-ng: move to Python 3
hwlatdetect: move to Python 3
python3-numpy: add a recipe
automake: drop the Python scriptlets to determine Python's directories

 meta/conf/distro/include/distro_alias.inc          |    2 -
 meta/conf/distro/include/security_flags.inc        |    1 -
 meta/recipes-connectivity/bind/bind_9.10.3-P3.bb   |    4 +-
 meta/recipes-connectivity/bluez5/bluez5.inc        |    6 +-
 meta/recipes-connectivity/connman/connman.inc      |    6 +-
 meta/recipes-connectivity/neard/neard_0.15.bb      |   13 +-
 .../nfs-utils/nfs-utils_1.3.3.bb                   |    6 +-
 meta/recipes-connectivity/ofono/ofono.inc          |    6 +-
 .../ofono/Revert-test-Convert-to-Python-3.patch    | 1270 --------------------
 meta/recipes-connectivity/ofono/ofono_1.17.bb      |    1 -
 meta/recipes-core/dbus/dbus-test_1.10.6.bb         |    2 +-
 meta/recipes-core/glib-2.0/glib.inc                |    8 +-
 meta/recipes-core/systemd/systemd_229.bb           |    2 +-
 meta/recipes-core/util-linux/util-linux.inc        |   11 +-
 .../automake/automake/python-libdir.patch          |   62 +-
 .../bootchart2/bootchart2_0.14.8.bb                |   16 +-
 meta/recipes-devtools/gdb/gdb-common.inc           |    2 +-
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc   |   12 +-
 meta/recipes-devtools/gdb/gdb-cross.inc            |    4 +-
 meta/recipes-devtools/gdb/gdb_7.11.bb              |    6 +-
 .../python-numpy/python3-numpy_1.10.4.bb           |  101 ++
 ...ing-setup.py-force-paths-for-zlib-freetyp.patch |   55 -
 .../allow.to.disable.some.features.patch           |   65 -
 .../python-imaging/fix-freetype-includes.patch     |   30 -
 .../python/python-imaging_1.1.7.bb                 |   45 -
 .../python/python-pycairo_1.10.0.bb                |   41 -
 .../python/python-pyrex-native_0.9.9.bb            |    5 -
 .../python-pyrex/pyrex-fix-optimized-mode.patch    |   15 -
 meta/recipes-devtools/python/python-pyrex_0.9.9.bb |   22 -
 ...{python-dbus_1.2.0.bb => python3-dbus_1.2.4.bb} |   19 +-
 ...n-docutils_0.12.bb => python3-docutils_0.12.bb} |    4 +-
 .../python/python3-native_3.5.1.bb                 |    1 -
 .../python/python3-pycairo_1.10.0.bb               |   40 +
 ...c-add-sysroot-path-to-GI_DATADIR-don-t-se.patch |    0
 ...bject_3.18.2.bb => python3-pygobject_3.18.2.bb} |    8 +-
 .../python/python3/110-enable-zlib.patch           |   21 -
 meta/recipes-devtools/python/python3_3.5.1.bb      |    1 -
 meta/recipes-devtools/swig/swig.inc                |    7 +-
 meta/recipes-extended/libuser/libuser_0.62.bb      |    8 +-
 .../newt/libnewt-python_0.52.18.bb                 |    6 +-
 .../packagegroup-core-full-cmdline.bb              |    1 -
 meta/recipes-gnome/epiphany/epiphany_3.18.4.bb     |    1 -
 .../gnome-desktop/gnome-desktop3_3.18.2.bb         |    2 +-
 meta/recipes-gnome/gnome/gnome-doc-utils.inc       |   29 -
 .../gnome-doc-utils/sysrooted-pkg-config.patch     |   35 -
 .../use-usr-bin-env-for-python-in-xml2po.patch     |   30 -
 .../gnome/gnome-doc-utils/xsltproc_nonet.patch     |   95 --
 .../recipes-gnome/gnome/gnome-doc-utils_0.20.10.bb |   12 -
 ...d-look-for-python-3.0-when-building-pytho.patch |   30 -
 meta/recipes-kernel/lttng/lttng-tools_git.bb       |    7 +-
 meta/recipes-kernel/lttng/lttng-ust_git.bb         |    9 +-
 meta/recipes-kernel/systemtap/systemtap_git.bb     |    5 +-
 meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb       |    6 +-
 meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb  |   12 +-
 54 files changed, 285 insertions(+), 1923 deletions(-)
 delete mode 100644 meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch
 create mode 100644 meta/recipes-devtools/python-numpy/python3-numpy_1.10.4.bb
 delete mode 100644 meta/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch
 delete mode 100644 meta/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch
 delete mode 100644 meta/recipes-devtools/python/python-imaging/fix-freetype-includes.patch
 delete mode 100644 meta/recipes-devtools/python/python-imaging_1.1.7.bb
 delete mode 100644 meta/recipes-devtools/python/python-pycairo_1.10.0.bb
 delete mode 100644 meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb
 delete mode 100644 meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch
 delete mode 100644 meta/recipes-devtools/python/python-pyrex_0.9.9.bb
 rename meta/recipes-devtools/python/{python-dbus_1.2.0.bb => python3-dbus_1.2.4.bb} (55%)
 rename meta/recipes-devtools/python/{python-docutils_0.12.bb => python3-docutils_0.12.bb} (92%)
 create mode 100644 meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
 rename meta/recipes-devtools/python/{python-pygobject => python3-pygobject}/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch (100%)
 rename meta/recipes-devtools/python/{python-pygobject_3.18.2.bb => python3-pygobject_3.18.2.bb} (72%)
 delete mode 100644 meta/recipes-devtools/python/python3/110-enable-zlib.patch
 delete mode 100644 meta/recipes-gnome/gnome/gnome-doc-utils.inc
 delete mode 100644 meta/recipes-gnome/gnome/gnome-doc-utils/sysrooted-pkg-config.patch
 delete mode 100644 meta/recipes-gnome/gnome/gnome-doc-utils/use-usr-bin-env-for-python-in-xml2po.patch
 delete mode 100644 meta/recipes-gnome/gnome/gnome-doc-utils/xsltproc_nonet.patch
 delete mode 100644 meta/recipes-gnome/gnome/gnome-doc-utils_0.20.10.bb
 delete mode 100644 meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch
Signature · 1 line
2.8.1
#1 lore raw

PATCH 1/31 bind: switch Python dependency to Python 3.x

---
 meta/recipes-connectivity/bind/bind_9.10.3-P3.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/bind/bind_9.10.3-P3.bb +2 -2
index 1e3a20f..a99f0dd 100644
@@ -56,7 +56,7 @@ SYSTEMD_SERVICE_${PN} = "named.service"
 
 PARALLEL_MAKE = ""
 
-RDEPENDS_${PN} = "python-core"
+RDEPENDS_${PN} = "python3-core"
 RDEPENDS_${PN}-dev = ""
 
 PACKAGE_BEFORE_PN += "${PN}-utils"
@@ -81,7 +81,7 @@ do_install_append() {
 	install -d "${D}${sysconfdir}/init.d"
 	install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
 	install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
-	sed -i -e '1s,#!.*python,#! /usr/bin/env python,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
+	sed -i -e '1s,#!.*python,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
 
 	# Install systemd related files
 	install -d ${D}${sbindir}
Signature · 1 line
2.8.1
#2 lore raw

PATCH 2/31 python-dbus: update to 1.2.4, port to python 3

In reply to Alexander Kanavin
---
 .../{python-dbus_1.2.0.bb => python3-dbus_1.2.4.bb}       | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
 rename meta/recipes-devtools/python/{python-dbus_1.2.0.bb => python3-dbus_1.2.4.bb} (62%)
meta/recipes-devtools/python/python3-dbus_1.2.4.bb renamed from meta/recipes-devtools/python/python-dbus_1.2.0.bb +8 -7
similarity index 62%
rename from meta/recipes-devtools/python/python-dbus_1.2.0.bb
rename to meta/recipes-devtools/python/python3-dbus_1.2.4.bb
index ccdb9ae..c058caf 100644
@@ -3,24 +3,25 @@ SECTION = "devel/python"
 HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=0b83047ce9e948b67c0facc5f233476a"
-DEPENDS = "expat dbus dbus-glib virtual/libintl python-pyrex-native"
+DEPENDS = "expat dbus dbus-glib virtual/libintl"
 
 SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz \
 "
 
-SRC_URI[md5sum] = "b09cd2d1a057cc432ce944de3fc06bf7"
-SRC_URI[sha256sum] = "e12c6c8b2bf3a9302f75166952cbe41d6b38c3441bbc6767dbd498942316c6df"
+SRC_URI[md5sum] = "7372a588c83a7232b4e08159bfd48fe5"
+SRC_URI[sha256sum] = "e2f1d6871f74fba23652e51d10873e54f71adab0525833c19bad9e99b1b2f9cc"
 S = "${WORKDIR}/dbus-python-${PV}"
 
-inherit distutils-base autotools pkgconfig
+inherit distutils3-base autotools pkgconfig
 
 PACKAGECONFIG ?= ""
 PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python-docutils-native"
 PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python-docutils-native python-epydoc-native"
 
-export STAGING_LIBDIR
-export STAGING_INCDIR
+do_configure_prepend() {
+    export PYTHON=${PYTHON}
+}
 
-RDEPENDS_${PN} = "python-io python-logging python-stringold python-threading python-xml"
+RDEPENDS_${PN} = "python3-io python3-logging python3-stringold python3-threading python3-xml"
 
 FILES_${PN}-dev += "${libdir}/pkgconfig"
Signature · 1 line
2.8.1
#3 lore raw

PATCH 3/31 python3: drop 110-enable-zlib.patch

In reply to Alexander Kanavin

With the patch, the zlib extension wasn't built at all. Without the patch, it gets build just fine.

---
 .../recipes-devtools/python/python3-native_3.5.1.bb |  1 -
 .../python/python3/110-enable-zlib.patch            | 21 ---------------------
 meta/recipes-devtools/python/python3_3.5.1.bb       |  1 -
 3 files changed, 23 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python3/110-enable-zlib.patch
meta/recipes-devtools/python/python3-native_3.5.1.bb +0 -1
index e8d0f9b..126935b 100644
@@ -12,7 +12,6 @@ file://020-dont-compile-python-files.patch \
 file://030-fixup-include-dirs.patch \
 file://070-dont-clean-ipkg-install.patch \
 file://080-distutils-dont_adjust_files.patch \
-file://110-enable-zlib.patch \
 file://130-readline-setup.patch \
 file://150-fix-setupterm.patch \
 file://python-3.3-multilib.patch \
meta/recipes-devtools/python/python3/110-enable-zlib.patch deleted +0 -21
deleted file mode 100644
index fb92a19..0000000
@@ -1,21 +0,0 @@
-Enable zlib in python
-
--Khem
-
-Upstream-Status: Inappropriate [OE-Specific]
-
----
- Modules/Setup.dist |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/Modules/Setup.dist
-+++ b/Modules/Setup.dist
-@@ -354,7 +354,7 @@ _symtable symtablemodule.c
- # Andrew Kuchling's zlib module.
- # This require zlib 1.1.3 (or later).
- # See http://www.gzip.org/zlib/
--#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
-+zlib zlibmodule.c -lz
- 
- # Interface to the Expat XML parser
- #
meta/recipes-devtools/python/python3_3.5.1.bb +0 -1
index 62e7b65..ebfdcdb 100644
@@ -13,7 +13,6 @@ file://020-dont-compile-python-files.patch \
 file://030-fixup-include-dirs.patch \
 file://070-dont-clean-ipkg-install.patch \
 file://080-distutils-dont_adjust_files.patch \
-file://110-enable-zlib.patch \
 file://130-readline-setup.patch \
 file://150-fix-setupterm.patch \
 file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
Signature · 1 line
2.8.1
#4 lore raw

PATCH 4/31 glib: move to Python 3

In reply to Alexander Kanavin

Drop python-pygobject and python-dbus dependencies, because nothing in ptests depends on them, and it creates a circular dependency chain.

---
 meta/recipes-core/glib-2.0/glib.inc | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
meta/recipes-core/glib-2.0/glib.inc +3 -5
index ddf5e40..c6b8e57 100644
@@ -26,7 +26,7 @@ PACKAGES += "${PN}-codegen ${PN}-utils"
 
 LEAD_SONAME = "libglib-2.0.*"
 
-inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache
+inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache python3native
 
 S = "${WORKDIR}/glib-${PV}"
 
@@ -44,7 +44,7 @@ EXTRA_OECONF_class-native = "${CORECONF} --disable-selinux"
 EXTRA_OECONF_append_libc-uclibc = " --with-libiconv=gnu"
 
 do_configure_prepend() {
-	sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
+	sed -i -e '1s,#!.*,#!${USRBINPATH}/env python3,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
 }
 
 FILES_${PN} = "${libdir}/lib*${SOLIBS} \
@@ -73,7 +73,7 @@ USE_NLS = "yes"
 
 do_install_append () {
 	if [ -f ${D}${bindir}/gtester-report ]; then
-		sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python|'
+		sed ${D}${bindir}/gtester-report -i -e '1s|^#!.*|#!/usr/bin/env python3|'
 	fi
 
 	# Remove some unpackaged files
@@ -109,8 +109,6 @@ RDEPENDS_${PN}-ptest += "\
             tzdata-asia \
             tzdata-europe \
             tzdata-posix \
-            python-pygobject \
-            python-dbus \
             shared-mime-info \
            "
 
Signature · 1 line
2.8.1
#5 lore raw

PATCH 5/31 dbus-test: remove unneeded pygobject dependency

In reply to Alexander Kanavin
---
 meta/recipes-core/dbus/dbus-test_1.10.6.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/dbus/dbus-test_1.10.6.bb +1 -1
index 3748fe6..af99976 100644
@@ -5,7 +5,7 @@ LICENSE = "AFL-2 | GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
                     file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
 
-DEPENDS = "python-pygobject dbus"
+DEPENDS = "dbus glib-2.0"
 
 RDEPENDS_${PN} += "make"
 RDEPENDS_${PN}-dev = ""
Signature · 1 line
2.8.1
#6 lore raw

PATCH 6/31 python-pygobject: port to Python 3

In reply to Alexander Kanavin

This reverts commit 7f7c9ab29eba0e58916629ca13dc4a494535ce19.

---
 ...001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch | 0
 .../{python-pygobject_3.18.2.bb => python3-pygobject_3.18.2.bb}   | 8 ++++----
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-devtools/python/{python-pygobject => python3-pygobject}/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch (100%)
 rename meta/recipes-devtools/python/{python-pygobject_3.18.2.bb => python3-pygobject_3.18.2.bb} (72%)
meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch renamed from meta/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch +0 -0
similarity index 100%
rename from meta/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
rename to meta/recipes-devtools/python/python3-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
meta/recipes-devtools/python/python3-pygobject_3.18.2.bb renamed from meta/recipes-devtools/python/python-pygobject_3.18.2.bb +4 -4
similarity index 72%
rename from meta/recipes-devtools/python/python-pygobject_3.18.2.bb
rename to meta/recipes-devtools/python/python3-pygobject_3.18.2.bb
index 00c5079..4ddae81 100644
@@ -3,9 +3,9 @@ SECTION = "devel/python"
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
 
-inherit autotools pkgconfig gnomebase distutils-base gobject-introspection
+inherit autotools pkgconfig gnomebase distutils3-base gobject-introspection
 
-DEPENDS += "python glib-2.0"
+DEPENDS += "python3 glib-2.0"
 
 SRCNAME="pygobject"
 SRC_URI = " \
@@ -20,6 +20,6 @@ S = "${WORKDIR}/${SRCNAME}-${PV}"
 
 BBCLASSEXTEND = "native"
 
-EXTRA_OECONF = "--disable-cairo --with-python=python2.7"
+EXTRA_OECONF = "--disable-cairo"
 
-RDEPENDS_${PN} += "python-setuptools python-importlib"
+RDEPENDS_${PN} += "python3-setuptools python3-importlib"
Signature · 1 line
2.8.1
#7 lore raw

PATCH 7/31 neard: do not package python test scripts

In reply to Alexander Kanavin

They require python-dbus and python-gobject (which are only provided for Python 3), and have not been ported to Python 3.

---
 meta/recipes-connectivity/neard/neard_0.15.bb | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
meta/recipes-connectivity/neard/neard_0.15.bb +1 -12
index 93bddb3..065cbec 100644
@@ -33,18 +33,9 @@ do_install_append() {
 		  > ${D}${sysconfdir}/init.d/neard
 		chmod 0755 ${D}${sysconfdir}/init.d/neard
 	fi
-
-	# Install the tests for neard-tests
-	install -d ${D}${libdir}/neard
-	install -m 0755 ${S}/test/* ${D}${libdir}/${BPN}/
-	install -m 0755 ${B}/tools/nfctool/nfctool ${D}${libdir}/${BPN}/
 }
 
-PACKAGES =+ "${PN}-tests"
-
-FILES_${PN}-tests = "${libdir}/${BPN}/*-test"
-
-RDEPENDS_${PN} = "dbus python python-dbus python-pygobject"
+RDEPENDS_${PN} = "dbus"
 
 # Bluez & Wifi are not mandatory except for handover
 RRECOMMENDS_${PN} = "\
@@ -52,8 +43,6 @@ RRECOMMENDS_${PN} = "\
                      ${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \
                     "
 
-RDEPENDS_${PN}-tests = "python python-dbus python-pygobject"
-
 INITSCRIPT_NAME = "neard"
 INITSCRIPT_PARAMS = "defaults 64"
 
Signature · 1 line
2.8.1
#8 lore raw

PATCH 8/31 bluez5: switch to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-connectivity/bluez5/bluez5.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-connectivity/bluez5/bluez5.inc +5 -1
index b3cd8ed..92e360a 100644
@@ -69,6 +69,10 @@ do_install_append() {
         for f in ${NOINST_TOOLS} ; do
 	    install -m 755 ${B}/$f ${D}/${bindir}
 	done
+
+        # Patch python tools to use Python 3; they should be source compatible, but
+        # still refer to Python 2 in the shebang
+        sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/bluez/test/*
 }
 
 ALLOW_EMPTY_libasound-module-bluez = "1"
@@ -99,7 +103,7 @@ def get_noinst_tools_paths (d, bb, tools):
 
 FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}"
 
-RDEPENDS_${PN}-testtools += "python python-dbus python-pygobject"
+RDEPENDS_${PN}-testtools += "python3 python3-dbus python3-pygobject"
 
 SYSTEMD_SERVICE_${PN} = "bluetooth.service"
 INITSCRIPT_PACKAGES = "${PN}"
Signature · 1 line
2.8.1
#9 lore raw

PATCH 9/31 connman: do not install Python test scripts

In reply to Alexander Kanavin

They are not compatible with python 3, and require python-dbus and python-gobject (which are provided only for Python 3).

---
 meta/recipes-connectivity/connman/connman.inc | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
meta/recipes-connectivity/connman/connman.inc +1 -5
index c375251..f09a2de 100644
@@ -26,7 +26,6 @@ EXTRA_OECONF += "\
     --enable-loopback \
     --enable-ethernet \
     --enable-tools \
-    --enable-test \
     --disable-polkit \
     --enable-client \
 "
@@ -140,10 +139,7 @@ PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
 FILES_${PN}-tools = "${bindir}/wispr"
 RDEPENDS_${PN}-tools ="${PN}"
 
-FILES_${PN}-tests = "${bindir}/*-test ${libdir}/${BPN}/test/*"
-RDEPENDS_${PN}-tests = "python-dbus python-pygobject python-textutils python-subprocess python-fcntl python-netclient \
-                        ${PN} \
-"
+FILES_${PN}-tests = "${bindir}/*-test"
 
 FILES_${PN}-client = "${bindir}/connmanctl"
 RDEPENDS_${PN}-client ="${PN}"
Signature · 1 line
2.8.1
#10 lore raw

PATCH 10/31 ofono: drop the custom-made revert to Python 2 from Python 3

In reply to Alexander Kanavin
---
 meta/recipes-connectivity/ofono/ofono.inc          |    6 +-
 .../ofono/Revert-test-Convert-to-Python-3.patch    | 1270 --------------------
 meta/recipes-connectivity/ofono/ofono_1.17.bb      |    1 -
 3 files changed, 5 insertions(+), 1272 deletions(-)
 delete mode 100644 meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch
meta/recipes-connectivity/ofono/ofono.inc +5 -1
index c415a39..72bbcac 100644
@@ -26,6 +26,10 @@ SYSTEMD_SERVICE_${PN} = "ofono.service"
 do_install_append() {
   install -d ${D}${sysconfdir}/init.d/
   install -m 0755 ${WORKDIR}/ofono ${D}${sysconfdir}/init.d/ofono
+
+  # Ofono still has one test tool that refers to Python 2 in the shebang
+  sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/ofono/test/set-ddr
+
 }
 
 PACKAGES =+ "${PN}-tests"
@@ -34,4 +38,4 @@ RDEPENDS_${PN} += "dbus"
 
 FILES_${PN} += "${base_libdir}/udev ${systemd_unitdir}"
 FILES_${PN}-tests = "${libdir}/${BPN}/test"
-RDEPENDS_${PN}-tests = "python python-pygobject python-dbus"
+RDEPENDS_${PN}-tests = "python3 python3-pygobject python3-dbus"
meta/recipes-connectivity/ofono/ofono/Revert-test-Convert-to-Python-3.patch deleted +0 -1270

1,270 lines not on this page · raw message

meta/recipes-connectivity/ofono/ofono_1.17.bb +0 -1
index 947f9d7..69f395777 100644
@@ -3,7 +3,6 @@ require ofono.inc
 SRC_URI  = "\
   ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
   file://ofono \
-  file://Revert-test-Convert-to-Python-3.patch \
 "
 SRC_URI[md5sum] = "d280b1d267ba5bf391d2a898fea7c748"
 SRC_URI[sha256sum] = "cbf20f07fd15253c682b23c1786d517f505c3688f7c4ea93da777e1523b89635"
Signature · 1 line
2.8.1
#11 lore raw

PATCH 11/31 packagegroup-core-full-cmdline: drop python-dbus from the list of services

In reply to Alexander Kanavin

Any Python scripts should include this dependency explicitly.

---
 meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb | 1 -
 1 file changed, 1 deletion(-)
meta/recipes-extended/packagegroups/packagegroup-core-full-cmdline.bb +0 -1
index f33b43e..a60a68c 100644
@@ -143,7 +143,6 @@ RDEPENDS_packagegroup-core-full-cmdline-sys-services = "\
     cronie \
     dbus \
     dbus-glib \
-    python-dbus \
     elfutils \
     gzip \
     less \
Signature · 1 line
2.8.1
#12 lore raw

PATCH 12/31 nfs-utils: switch to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb +5 -1
index a6268f3..285bd2c 100644
@@ -88,7 +88,7 @@ FILES_${PN}-client = "${base_sbindir}/*mount.nfs* ${sbindir}/*statd \
 		      ${sysconfdir}/init.d/nfscommon \
 		      ${systemd_unitdir}/system/nfs-statd.service"
 FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat"
-RDEPENDS_${PN}-stats = "python"
+RDEPENDS_${PN}-stats = "python3-core"
 
 FILES_${PN} += "${systemd_unitdir}"
 
@@ -140,4 +140,8 @@ do_install_append () {
 	rm -f ${D}${sbindir}/rpcdebug
 	rm -f ${D}${sbindir}/rpcgen
 	rm -f ${D}${sbindir}/locktest
+
+        # Make python tools use python 3
+        sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat
+
 }
Signature · 1 line
2.8.1
#13 lore raw

PATCH 13/31 systemd: drop python dependency for ptests

In reply to Alexander Kanavin

Python tests are not actually used, because systemd is configured using --without-python

---
 meta/recipes-core/systemd/systemd_229.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_229.bb +1 -1
index ae63c58..a1ca0e8 100644
@@ -336,7 +336,7 @@ FILES_${PN}-analyze = "${bindir}/systemd-analyze"
 FILES_${PN}-initramfs = "/init"
 RDEPENDS_${PN}-initramfs = "${PN}"
 
-RDEPENDS_${PN}-ptest += "gawk make perl python bash xz \
+RDEPENDS_${PN}-ptest += "gawk make perl bash xz \
                          tzdata tzdata-americas tzdata-asia \
                          tzdata-europe tzdata-africa tzdata-antarctica \
                          tzdata-arctic tzdata-atlantic tzdata-australia \
Signature · 1 line
2.8.1
#14 lore raw

PATCH 14/31 util-linux: move to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-core/util-linux/util-linux.inc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
meta/recipes-core/util-linux/util-linux.inc +6 -5
index a1614c2..c0f2540 100644
@@ -17,7 +17,7 @@ LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c
                     file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \
                     file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16"
 
-inherit autotools gettext pkgconfig systemd update-alternatives python-dir ptest bash-completion
+inherit autotools gettext pkgconfig systemd update-alternatives python3-dir ptest bash-completion
 DEPENDS = "zlib ncurses"
 DEPENDS_append_class-native = " lzo-native"
 DEPENDS_append_class-nativesdk = " lzo-native"
@@ -60,14 +60,14 @@ PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_u
 PACKAGECONFIG[libcap-ng] = "--enable-setpriv,--disable-setpriv,libcap-ng,"
 
 # Build python bindings for libmount
-PACKAGECONFIG[pylibmount] = "--with-python --enable-pylibmount,--without-python --disable-pylibmount,python"
+PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-python --disable-pylibmount,python3"
 
 # Readline support
 PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
 
 FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
 
-FILES_${PN}-dev += "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.la"
+FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
 
 FILES_util-linux-agetty = "${base_sbindir}/agetty"
 FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${BPN}"
@@ -89,8 +89,9 @@ FILES_util-linux-findfs = "${sbindir}/findfs"
 FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}"
 FILES_util-linux-runuser = "${sbindir}/runuser"
 
-FILES_util-linux-pylibmount = "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.so \
-                               ${libdir}/${PYTHON_DIR}/dist-packages/libmount/__init__.*"
+FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
+                               ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
+                               ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*"
 FILES_util-linux-lscpu = "${bindir}/lscpu"
 
 FILES_util-linux-fsck = "${base_sbindir}/fsck*"
Signature · 1 line
2.8.1
#15 lore raw

PATCH 15/31 python-pycairo: move to Python 3

In reply to Alexander Kanavin

The Python 3 version comes in a separate tarball, and is relicensed under LGPLv3:
http://cairographics.org/pycairo/

---
 .../python/python-pycairo_1.10.0.bb                | 41 ----------------------
 .../python/python3-pycairo_1.10.0.bb               | 40 +++++++++++++++++++++
 2 files changed, 40 insertions(+), 41 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python-pycairo_1.10.0.bb
 create mode 100644 meta/recipes-devtools/python/python3-pycairo_1.10.0.bb
meta/recipes-devtools/python/python-pycairo_1.10.0.bb deleted +0 -41
deleted file mode 100644
index 78e8a4e..0000000
@@ -1,41 +0,0 @@
-SUMMARY = "Python bindings for the Cairo canvas library"
-HOMEPAGE = "http://cairographics.org/pycairo"
-BUGTRACKER = "http://bugs.freedesktop.org"
-SECTION = "python-devel"
-LICENSE = "LGPLv2.1 & MPL-1.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f2e071ab72978431b294a0d696327421 \
-                    file://COPYING-LGPL-2.1;md5=fad9b3332be894bab9bc501572864b29 \
-                    file://COPYING-MPL-1.1;md5=bfe1f75d606912a4111c90743d6c7325"
-
-# cairo >= 1.8.8
-DEPENDS = "cairo"
-PR = "r2"
-
-SRC_URI = "http://cairographics.org/releases/py2cairo-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "20337132c4ab06c1146ad384d55372c5"
-SRC_URI[sha256sum] = "d30439f06c2ec1a39e27464c6c828b6eface3b22ee17b2de05dc409e429a7431"
-
-S = "${WORKDIR}/py2cairo-${PV}"
-
-inherit distutils pkgconfig
-
-BBCLASSEXTEND = "native"
-
-do_configure() {
-	./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir}
-}
-
-do_compile() {
-	./waf build ${PARALLEL_MAKE}
-}
-
-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/
-}
meta/recipes-devtools/python/python3-pycairo_1.10.0.bb new file +40 -0
new file mode 100644
index 0000000..f9031b3
@@ -0,0 +1,40 @@
+SUMMARY = "Python bindings for the Cairo canvas library"
+HOMEPAGE = "http://cairographics.org/pycairo"
+BUGTRACKER = "http://bugs.freedesktop.org"
+SECTION = "python-devel"
+LICENSE = "LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+# cairo >= 1.8.8
+DEPENDS = "cairo"
+PR = "r2"
+
+SRC_URI = "http://cairographics.org/releases/pycairo-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "e6fd3f2f1e6a72e0db0868c4985669c5"
+SRC_URI[sha256sum] = "9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be"
+
+S = "${WORKDIR}/pycairo-${PV}"
+
+inherit distutils3 pkgconfig
+
+BBCLASSEXTEND = "native"
+
+do_configure() {
+	PYTHON=${PYTHON} ./waf configure --prefix=${D}${prefix} --libdir=${D}${libdir}
+}
+
+do_compile() {
+	./waf build ${PARALLEL_MAKE}
+}
+
+do_install() {
+	./waf install
+	sed \
+		-e 's:@prefix@:${prefix}:' \
+		-e 's:@VERSION@:${PV}:' \
+		-e 's:@includedir@:${includedir}:' \
+		py3cairo.pc.in > py3cairo.pc
+	install -m 0644 py3cairo.pc ${D}${libdir}/pkgconfig/
+}
Signature · 1 line
2.8.1
#16 lore raw

PATCH 16/31 bootchart2: move to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb +6 -10
index 86c614a..d0555c3 100644
@@ -99,7 +99,7 @@ SRCREV = "48e0071048564c6af75ab969e842d6dec808da09"
 
 inherit systemd
 inherit update-rc.d
-inherit pythonnative
+inherit python3native
 
 # The only reason to build bootchart2-native is for a native pybootchartgui.
 BBCLASSEXTEND = "native"
@@ -110,13 +110,6 @@ UPDATERCPN = "bootchartd-stop-initscript"
 INITSCRIPT_NAME = "bootchartd_stop.sh"
 INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
 
-# We want native pybootchartgui to execute with the correct Python interpeter.
-do_compile_append_class-native () {
-    echo "#! ${PYTHON}" | cat - ${S}/pybootchartgui.py > ${WORKDIR}/temp_pybootchartgui
-    mv ${WORKDIR}/temp_pybootchartgui ${S}/pybootchartgui.py
-    chmod +x ${S}/pybootchartgui
-}
-
 do_compile_prepend () {
     export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
     export BINDIR="${bindir}"
@@ -135,14 +128,17 @@ do_install () {
     install -m 0755 ${WORKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d
 
     echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf
+
+   # Use python 3 instead of python 2
+   sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/pybootchartgui
 }
 
 PACKAGES =+ "pybootchartgui"
 FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui"
-RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image python-textutils python-shell python-compression python-codecs"
+RDEPENDS_pybootchartgui = "python3-pycairo python3-compression python3-image python3-textutils python3-shell python3-compression python3-codecs"
 RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
 RDEPENDS_${PN}_class-target += "lsb"
-DEPENDS_append_class-native = " python-pycairo-native"
+DEPENDS_append_class-native = " python3-pycairo-native"
 
 PACKAGES =+ "bootchartd-stop-initscript"
 FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d"
Signature · 1 line
2.8.1
#17 lore raw

PATCH 17/31 gdb: move to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-devtools/gdb/gdb-common.inc         |  2 +-
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 12 ++++++------
 meta/recipes-devtools/gdb/gdb-cross.inc          |  4 ++--
 meta/recipes-devtools/gdb/gdb_7.11.bb            |  6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)
meta/recipes-devtools/gdb/gdb-common.inc +1 -1
index 3e00a2e..a5a9adf 100644
@@ -61,7 +61,7 @@ EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x --disable-werror \
 PACKAGECONFIG ??= "readline"
 # Use --without-system-readline to compile with readline 5.
 PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
-PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python,python python-codecs"
+PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs"
 PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
 
 GDBPROPREFIX = "--program-prefix=''"
meta/recipes-devtools/gdb/gdb-cross-canadian.inc +6 -6
index 6e42af1..e53081d 100644
@@ -1,5 +1,5 @@
 inherit cross-canadian
-inherit python-dir
+inherit python3-dir
 
 SUMMARY = "GNU debugger (cross-canadian gdb for ${TARGET_ARCH} target)"
 PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
@@ -12,9 +12,9 @@ GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 
 # Overrides PACKAGECONFIG variables in gdb-common.inc
 PACKAGECONFIG ??= "python readline"
-PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python, \
-                         nativesdk-python-core nativesdk-python-lang nativesdk-python-re \
-                         nativesdk-python-codecs nativesdk-python-netclient"
+PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
+                         nativesdk-python3-core nativesdk-python3-lang nativesdk-python3-re \
+                         nativesdk-python3-codecs nativesdk-python3-netclient"
 PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline"
 
 SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
@@ -23,8 +23,8 @@ do_configure_prepend() {
 cat > ${WORKDIR}/python << EOF
 #! /bin/sh
 case "\$2" in
-        --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;;
-        --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
+        --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;;
+        --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;;
         --exec-prefix) echo "${exec_prefix}" ;;
         *) exit 1 ;;
 esac
meta/recipes-devtools/gdb/gdb-cross.inc +2 -2
index c62715f..7579205 100644
@@ -2,11 +2,11 @@ require gdb-common.inc
 
 DEPENDS = "expat-native ncurses-native"
 
-inherit pythonnative
+inherit python3native
 
 # Overrides PACKAGECONFIG variables in gdb-common.inc
 PACKAGECONFIG ??= "python readline"
-PACKAGECONFIG[python] = "--with-python=${STAGING_BINDIR_NATIVE}/python-native/python,--without-python,python-native"
+PACKAGECONFIG[python] = "--with-python=${STAGING_BINDIR_NATIVE}/python-native/python,--without-python,python3-native"
 PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline-native"
 
 do_compile_prepend() {
meta/recipes-devtools/gdb/gdb_7.11.bb +3 -3
index ccc33b8..f02e643 100644
@@ -1,15 +1,15 @@
 require gdb.inc
 require gdb-${PV}.inc
 
-inherit python-dir
+inherit python3-dir
 
 do_configure_prepend() {
 	if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then
 		cat > ${WORKDIR}/python << EOF
 #!/bin/sh
 case "\$2" in
-	--includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;;
-	--ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
+	--includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;;
+	--ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;;
 	--exec-prefix) echo "${exec_prefix}" ;;
 	*) exit 1 ;;
 esac
Signature · 1 line
2.8.1
#18 lore raw

PATCH 18/31 swig: move to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-devtools/swig/swig.inc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
meta/recipes-devtools/swig/swig.inc +3 -4
index 9da40df..704bb27 100644
@@ -7,14 +7,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \
 
 SECTION = "devel"
 
-DEPENDS = "libpcre python"
+DEPENDS = "libpcre python3"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
 
-inherit autotools pythonnative
+inherit autotools python3native
 
 EXTRA_OECONF = " \
-    --with-python=${PYTHON} \
+    --with-python3=${PYTHON} \
     --without-allegrocl \
     --without-android \
     --without-boost \
@@ -33,7 +33,6 @@ EXTRA_OECONF = " \
     --without-perl5 \
     --without-pike \
     --without-php \
-    --without-python3 \
     --without-r \
     --without-ruby \
     --without-tcl \
Signature · 1 line
2.8.1
#19 lore raw

PATCH 19/31 python-pyrex: remove unused recipe

In reply to Alexander Kanavin
---
 meta/conf/distro/include/distro_alias.inc          |  1 -
 .../python/python-pyrex-native_0.9.9.bb            |  5 -----
 .../python-pyrex/pyrex-fix-optimized-mode.patch    | 15 ---------------
 meta/recipes-devtools/python/python-pyrex_0.9.9.bb | 22 ----------------------
 4 files changed, 43 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb
 delete mode 100644 meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch
 delete mode 100644 meta/recipes-devtools/python/python-pyrex_0.9.9.bb
meta/conf/distro/include/distro_alias.inc +0 -1
index c8f9395..5626792 100644
@@ -343,7 +343,6 @@ DISTRO_PN_ALIAS_pn-python-mako = "Fedora=python-mako Opensuse=python-Mako"
 DISTRO_PN_ALIAS_pn-python-pycairo = "Meego=pycairo Fedora=pycairo Ubuntu=pycairo Debian=pycairo"
 DISTRO_PN_ALIAS_pn-python-pycurl = "Debian=python-pycurl Ubuntu=python-pycurl"
 DISTRO_PN_ALIAS_pn-python-pygobject = "Meego=pygobject2 Fedora=pygobject2 Ubuntu=pygobject Debian=pygobject"
-DISTRO_PN_ALIAS_pn-python-pyrex = "Mandriva=python-pyrex Ubuntu=python-pyrex"
 DISTRO_PN_ALIAS_pn-python-scons = "Fedora=scons OpenSuSE=scons Ubuntu=scons Mandriva=scons Debian=scons"
 DISTRO_PN_ALIAS_pn-python-setuptools = "Mandriva=python-setup OpenSuSE=python-setup-git"
 DISTRO_PN_ALIAS_pn-python-smartpm = "Debian=smart OpenSuSE=smart"
meta/recipes-devtools/python/python-pyrex-native_0.9.9.bb deleted +0 -5
deleted file mode 100644
index e8ef1aa..0000000
@@ -1,5 +0,0 @@
-require python-pyrex_${PV}.bb
-inherit native pythonnative
-DEPENDS = "python-native"
-RDEPENDS_${PN} = ""
-PR = "r3"
meta/recipes-devtools/python/python-pyrex/pyrex-fix-optimized-mode.patch deleted +0 -15
deleted file mode 100644
index c58c328..0000000
@@ -1,15 +0,0 @@
-Upstream-Status: Pending
-
-Index: Pyrex-0.9.8.4/Pyrex/Distutils/extension.py
-===================================================================
---- Pyrex-0.9.8.4.orig/Pyrex/Distutils/extension.py
-+++ Pyrex-0.9.8.4/Pyrex/Distutils/extension.py
-@@ -15,7 +15,7 @@ except ImportError:
-     warnings = None
- 
- class Extension(_Extension.Extension):
--    _Extension.Extension.__doc__ + \
-+    _Extension.Extension.__doc__ or "" + \
-     """pyrex_include_dirs : [string]
-         list of directories to search for Pyrex header files (.pxd) (in
-         Unix form for portability)
meta/recipes-devtools/python/python-pyrex_0.9.9.bb deleted +0 -22
deleted file mode 100644
index c4dd2e6..0000000
@@ -1,22 +0,0 @@
-SUMMARY = "Language for writing Python extension modules"
-DESCRIPTION = "Pyrex is a language specially designed for writing Python extension modules. \
-It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \
-and the messy, low-level world of C."
-SECTION = "devel/python"
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=771d472f53f933033f57eeee7808e5bd"
-SRCNAME = "Pyrex"
-PR = "r4"
-
-SRC_URI = "\
-  http://www.cosc.canterbury.ac.nz/greg.ewing/python/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
-  file://pyrex-fix-optimized-mode.patch \
-"
-
-SRC_URI[md5sum] = "515dee67d15d4393841e2d60e8341947"
-SRC_URI[sha256sum] = "5f87df06831d0b3412eb4bc9d3fc2ee7bfae1b913d7da8c23ab2bf5699fb6b50"
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils
-
-FILES_${PN} += "${datadir}${base_libdir}/${PYTHON_DIR}/site-packages/Pyrex/Compiler/Lexicon.pickle"
Signature · 1 line
2.8.1
#20 lore raw

PATCH 20/31 python-imaging: remove unused recipe

In reply to Alexander Kanavin
---
 meta/conf/distro/include/distro_alias.inc          |  1 -
 meta/conf/distro/include/security_flags.inc        |  1 -
 ...ing-setup.py-force-paths-for-zlib-freetyp.patch | 55 ------------------
 .../allow.to.disable.some.features.patch           | 65 ----------------------
 .../python-imaging/fix-freetype-includes.patch     | 30 ----------
 .../python/python-imaging_1.1.7.bb                 | 45 ---------------
 6 files changed, 197 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch
 delete mode 100644 meta/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch
 delete mode 100644 meta/recipes-devtools/python/python-imaging/fix-freetype-includes.patch
 delete mode 100644 meta/recipes-devtools/python/python-imaging_1.1.7.bb
meta/conf/distro/include/distro_alias.inc +0 -1
index 5626792..f3315b4 100644
@@ -338,7 +338,6 @@ DISTRO_PN_ALIAS_pn-python3-setuptools = "OpenSuSE=python3-setuptools Debian=pyth
 DISTRO_PN_ALIAS_pn-python-dbus = "Ubuntu=python-dbus Debian=python-dbus Mandriva=python-dbus"
 DISTRO_PN_ALIAS_pn-python-distribute = "Opensuse=python-setuptools Fedora=python-setuptools"
 DISTRO_PN_ALIAS_pn-python-git = "Debian=python-git Fedora=GitPython"
-DISTRO_PN_ALIAS_pn-python-imaging = "Mandriva=python-imaging Debian=python-imaging"
 DISTRO_PN_ALIAS_pn-python-mako = "Fedora=python-mako Opensuse=python-Mako"
 DISTRO_PN_ALIAS_pn-python-pycairo = "Meego=pycairo Fedora=pycairo Ubuntu=pycairo Debian=pycairo"
 DISTRO_PN_ALIAS_pn-python-pycurl = "Debian=python-pycurl Ubuntu=python-pycurl"
meta/conf/distro/include/security_flags.inc +0 -1
index fc4c581..a4c0ead 100644
@@ -76,7 +76,6 @@ SECURITY_CFLAGS_pn-openssl = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-opensp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-ppp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-python-imaging = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python-pycurl = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python-smartpm = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python-numpy = "${SECURITY_NO_PIE_CFLAGS}"
meta/recipes-devtools/python/python-imaging/0001-python-imaging-setup.py-force-paths-for-zlib-freetyp.patch deleted +0 -55

55 lines not on this page · raw message

meta/recipes-devtools/python/python-imaging/allow.to.disable.some.features.patch deleted +0 -65

65 lines not on this page · raw message

meta/recipes-devtools/python/python-imaging/fix-freetype-includes.patch deleted +0 -30
deleted file mode 100644
index 9ecc63a..0000000
@@ -1,30 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <[email protected]>
-
-From c6040f618d8f2706a7b46d1cdf37d1a587f9701f Mon Sep 17 00:00:00 2001
-From: Andrew Stromnov <[email protected]>
-Date: Thu, 28 Nov 2013 16:58:43 +0400
-Subject: [PATCH] fix compiling with FreeType 2.5.1
-
----
- _imagingft.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/_imagingft.c b/_imagingft.c
-index 47d50bd..f19555b 100644
---- a/_imagingft.c
-+++ b/_imagingft.c
-@@ -59,7 +59,11 @@ struct {
-     const char* message;
- } ft_errors[] =
- 
-+#if defined(USE_FREETYPE_2_1)
-+#include FT_ERRORS_H
-+#else
- #include <freetype/fterrors.h>
-+#endif
- 
- /* -------------------------------------------------------------------- */
- /* font objects */
--- 
-1.8.5.1
meta/recipes-devtools/python/python-imaging_1.1.7.bb deleted +0 -45

45 lines not on this page · raw message

Signature · 1 line
2.8.1
#21 lore raw

PATCH 21/31 python-docutils: move to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-devtools/python/python3-dbus_1.2.4.bb                    | 4 ++--
 .../python/{python-docutils_0.12.bb => python3-docutils_0.12.bb}      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-devtools/python/{python-docutils_0.12.bb => python3-docutils_0.12.bb} (92%)
meta/recipes-devtools/python/python3-dbus_1.2.4.bb +2 -2
index c058caf..759512c 100644
@@ -15,8 +15,8 @@ S = "${WORKDIR}/dbus-python-${PV}"
 inherit distutils3-base autotools pkgconfig
 
 PACKAGECONFIG ?= ""
-PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python-docutils-native"
-PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python-docutils-native python-epydoc-native"
+PACKAGECONFIG[docs] = "--enable-html-docs,--disable-html-docs,python3-docutils-native"
+PACKAGECONFIG[api-docs] = "--enable-api-docs,--disable-api-docs,python3-docutils-native python3-epydoc-native"
 
 do_configure_prepend() {
     export PYTHON=${PYTHON}
meta/recipes-devtools/python/python3-docutils_0.12.bb renamed from meta/recipes-devtools/python/python-docutils_0.12.bb +2 -2
similarity index 92%
rename from meta/recipes-devtools/python/python-docutils_0.12.bb
rename to meta/recipes-devtools/python/python3-docutils_0.12.bb
index 8cda88d..e78fa3b 100644
@@ -4,7 +4,7 @@ SECTION = "devel/python"
 LICENSE = "PSF & BSD-2-Clause & GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING.txt;md5=a722fbdc20347db7b69223594dd54574"
 
-DEPENDS = "python"
+DEPENDS = "python3"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/docutils/docutils-${PV}.tar.gz"
 SRC_URI[md5sum] = "4622263b62c5c771c03502afa3157768"
@@ -12,7 +12,7 @@ SRC_URI[sha256sum] = "c7db717810ab6965f66c8cf0398a98c9d8df982da39b4cd7f162911eb8
 
 S = "${WORKDIR}/docutils-${PV}"
 
-inherit distutils
+inherit distutils3
 
 BBCLASSEXTEND = "native"
 
Signature · 1 line
2.8.1
#22 lore raw

PATCH 22/31 libuser: move to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-extended/libuser/libuser_0.62.bb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
meta/recipes-extended/libuser/libuser_0.62.bb +5 -3
index 7a64efe..8590563 100644
@@ -20,11 +20,13 @@ SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \
 SRC_URI[md5sum] = "63e5e5c551e99dc5302b40b80bd6d4f2"
 SRC_URI[sha256sum] = "a58ff4fabb01a25043b142185a33eeea961109dd60d4b40b6a9df4fa3cace20b"
 
-DEPENDS = "popt libpam glib-2.0 docbook-utils-native linuxdoc-tools-native python"
+DEPENDS = "popt libpam glib-2.0 docbook-utils-native linuxdoc-tools-native python3"
 
-inherit autotools gettext pythonnative python-dir pkgconfig
+inherit autotools gettext python3native python3-dir pkgconfig
 
-EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}"
+export PYTHON
+
+EXTRA_OEMAKE = "PYTHON_CPPFLAGS=-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}"
 
 PACKAGES += "${PN}-python "
 
Signature · 1 line
2.8.1
#23 lore raw

PATCH 23/31 libnewt-python: move to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-extended/newt/libnewt-python_0.52.18.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-extended/newt/libnewt-python_0.52.18.bb +3 -3
index ba04757..20369ef 100644
@@ -1,10 +1,10 @@
 require recipes-extended/newt/libnewt_${PV}.bb
 
 SUMMARY .= " - python"
-DEPENDS = "libnewt python"
-RDEPENDS_${PN} += "python-core"
+DEPENDS = "libnewt python3"
+RDEPENDS_${PN} += "python3-core"
 
-inherit pythonnative python-dir
+inherit python3native python3-dir
 
 EXTRA_OECONF += "--with-python"
 EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
Signature · 1 line
2.8.1
#24 lore raw

PATCH 24/31 gnome-doc-utils: remove recipe

In reply to Alexander Kanavin

Nothing in oe-core actually requires it.

---
 meta/recipes-gnome/epiphany/epiphany_3.18.4.bb     |  1 -
 .../gnome-desktop/gnome-desktop3_3.18.2.bb         |  2 +-
 meta/recipes-gnome/gnome/gnome-doc-utils.inc       | 29 -------
 .../gnome-doc-utils/sysrooted-pkg-config.patch     | 35 --------
 .../use-usr-bin-env-for-python-in-xml2po.patch     | 30 -------
 .../gnome/gnome-doc-utils/xsltproc_nonet.patch     | 95 ----------------------
 .../recipes-gnome/gnome/gnome-doc-utils_0.20.10.bb | 12 ---
 7 files changed, 1 insertion(+), 203 deletions(-)
 delete mode 100644 meta/recipes-gnome/gnome/gnome-doc-utils.inc
 delete mode 100644 meta/recipes-gnome/gnome/gnome-doc-utils/sysrooted-pkg-config.patch
 delete mode 100644 meta/recipes-gnome/gnome/gnome-doc-utils/use-usr-bin-env-for-python-in-xml2po.patch
 delete mode 100644 meta/recipes-gnome/gnome/gnome-doc-utils/xsltproc_nonet.patch
 delete mode 100644 meta/recipes-gnome/gnome/gnome-doc-utils_0.20.10.bb
meta/recipes-gnome/epiphany/epiphany_3.18.4.bb +0 -1
index 869569c..f0582ac 100644
@@ -16,7 +16,6 @@ SRC_URI[archive.sha256sum] = "be699d484371111abae754e669187215df73e21533f461e513
 EXTRA_OECONF += " --disable-nss --with-distributor-name=${DISTRO}"
 
 do_configure_prepend() {
-    touch ${S}/gnome-doc-utils.make
     sed -i -e s:help::g ${S}/Makefile.am
 }
 
meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.18.2.bb +1 -1
index 75a99a6..7f00bc6 100644
@@ -10,7 +10,7 @@ inherit gnome pkgconfig upstream-version-is-even gobject-introspection
 SRC_URI[archive.md5sum] = "9a5875247abdb99bad93f1c4230d1d6d"
 SRC_URI[archive.sha256sum] = "ddd46d022de137543a71f50c7392b32f9b98d5d3f2b53040b35f5802de2e7b56"
 
-DEPENDS += "intltool-native gsettings-desktop-schemas gconf libxrandr virtual/libx11 gtk+3 glib-2.0 gnome-doc-utils startup-notification xkeyboard-config iso-codes"
+DEPENDS += "intltool-native gsettings-desktop-schemas gconf libxrandr virtual/libx11 gtk+3 glib-2.0 startup-notification xkeyboard-config iso-codes"
 
 inherit distro_features_check
 REQUIRED_DISTRO_FEATURES = "x11"
meta/recipes-gnome/gnome/gnome-doc-utils.inc deleted +0 -29
deleted file mode 100644
index 0d212c7..0000000
@@ -1,29 +0,0 @@
-SUMMARY = "A collection of documentation utilities for the Gnome project"
-DESCRIPTION = "The GNOME Documentation Build Utilities (gnome-doc- \
-utils) were created to make it easier for application developers to \
-include and create documentation in their releases. They include the \
-xml2po tool which makes it easier to translate and keep up to date \
-translations of documentation."
-LICENSE = "GPLv2 & LGPLv2.1"
-DEPENDS = "intltool-native libxml2 libxslt libxslt-native gnome-doc-utils-native glib-2.0"
-
-inherit gnomebase gettext python-dir pythonnative autotools-brokensep
-
-CLEANBROKEN = "1"
-
-EXTRA_OECONF += "--disable-scrollkeeper"
-
-do_install_append() {
-	chown -R root:root ${D}
-}
-
-do_install_append_class-native () {
-	sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' ${D}${bindir}/xml2po
-}
-
-FILES_${PN} += "${datadir}/xml* ${PYTHON_SITEPACKAGES_DIR}/*"
-
-RDEPENDS_${PN} = "bash"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native"
meta/recipes-gnome/gnome/gnome-doc-utils/sysrooted-pkg-config.patch deleted +0 -35
deleted file mode 100644
index 416d698..0000000
@@ -1,35 +0,0 @@
-In cross environment we have to prepend the sysroot to the path found by
-pkgconfig since the path returned from pkgconfig does not have sysroot prefixed
-it ends up using the files from host system. Now usually people have gnome installed
-so the build succeeds but if you dont have gnome installed on build host then
-it wont find the files on host system and packages using gnome-doc-utils wont
-compile.
-
-This should work ok with non sysrooted builds too since in those cases PKG_CONFIG_SYSROOT_DIR
-will be empty
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <[email protected]>
-Signed-off-by: Constantin Musca <[email protected]>
-
-Index: gnome-doc-utils-0.20.10/tools/gnome-doc-utils.make
-===================================================================
---- gnome-doc-utils-0.20.10.orig/tools/gnome-doc-utils.make
-+++ gnome-doc-utils-0.20.10/tools/gnome-doc-utils.make
-@@ -133,11 +133,11 @@ _DOC_ABS_SRCDIR = @abs_srcdir@
- _xml2po ?= `which xml2po`
- _xml2po_mode = $(if $(DOC_ID),mallard,docbook)
- 
--_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
--_db2omf  ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
--_chunks  ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
--_credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
--_ids ?= $(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl
-+_db2html ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2html gnome-doc-utils`
-+_db2omf  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
-+_chunks  ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
-+_credits ?= ${PKG_CONFIG_SYSROOT_DIR}`$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
-+_ids ?= ${PKG_CONFIG_SYSROOT_DIR}$(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl
- 
- if ENABLE_SK
- _ENABLE_SK = true
meta/recipes-gnome/gnome/gnome-doc-utils/use-usr-bin-env-for-python-in-xml2po.patch deleted +0 -30
deleted file mode 100644
index 0e196c0..0000000
@@ -1,30 +0,0 @@
-We can't use #!/full/path/to/python -u as this can be longer than shebang
-allows for.  In order to be appropraite for upstream more work would be
-needed to make sure that the main xml2po code doesn't rely on python
-being invoked with -u (force stdin/out/err to be used raw).
-
-Upstream-Status: Inappropriate [Would break behavior on Windows]
-Signed-off-by: Constantin Musca <[email protected]>
-
-Index: gnome-doc-utils-0.20.10/xml2po/xml2po/Makefile.am
-===================================================================
---- gnome-doc-utils-0.20.10.orig/xml2po/xml2po/Makefile.am
-+++ gnome-doc-utils-0.20.10/xml2po/xml2po/Makefile.am
-@@ -7,7 +7,6 @@ CLEANFILES = xml2po
- 
- xml2po: xml2po.py.in
- 	$(AM_V_GEN)sed -e "s/^VERSION =.*/VERSION = \"@VERSION@\"/" \
--	    -e "s+^#!.*python.*+#!$(PYTHON)+" \
- 	  < $(srcdir)/xml2po.py.in > xml2po
- 	$(AM_V_at)chmod +x xml2po
- 
-Index: gnome-doc-utils-0.20.10/xml2po/xml2po/xml2po.py.in
-===================================================================
---- gnome-doc-utils-0.20.10.orig/xml2po/xml2po/xml2po.py.in
-+++ gnome-doc-utils-0.20.10/xml2po/xml2po/xml2po.py.in
-@@ -1,4 +1,4 @@
--#!/usr/bin/python -u
-+#!/usr/bin/env python
- # -*- encoding: utf-8 -*-
- # Copyright (c) 2004, 2005, 2006 Danilo Šegan <[email protected]>.
- # Copyright (c) 2009 Claude Paroz <[email protected]>.
meta/recipes-gnome/gnome/gnome-doc-utils/xsltproc_nonet.patch deleted +0 -95

95 lines not on this page · raw message

meta/recipes-gnome/gnome/gnome-doc-utils_0.20.10.bb deleted +0 -12
deleted file mode 100644
index ed01ea7..0000000
@@ -1,12 +0,0 @@
-require gnome-doc-utils.inc
-LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=eb723b61539feef013de476e68b5c50a \
-		    file://COPYING.LGPL;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI += "file://xsltproc_nonet.patch \
-            file://use-usr-bin-env-for-python-in-xml2po.patch \
-            file://sysrooted-pkg-config.patch \
-            file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \
-           "
-
-SRC_URI[archive.md5sum] = "3c64ad7bacd617b04999e4a168afaac5"
-SRC_URI[archive.sha256sum] = "cb0639ffa9550b6ddf3b62f3b1add92fb92ab4690d351f2353cffe668be8c4a6"
Signature · 1 line
2.8.1
#25 lore raw

PATCH 25/31 lttng-tools: move to Python 3

In reply to Alexander Kanavin
---
 ...d-look-for-python-3.0-when-building-pytho.patch | 30 ----------------------
 meta/recipes-kernel/lttng/lttng-tools_git.bb       |  7 +++--
 2 files changed, 3 insertions(+), 34 deletions(-)
 delete mode 100644 meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch
meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch deleted +0 -30
deleted file mode 100644
index d05c04c..0000000
@@ -1,30 +0,0 @@
-From: Otavio Salvador <[email protected]>
-Date: Fri, 4 Dec 2015 16:11:41 +0000
-Subject: [PATCH] Revert "Build: look for python >= 3.0 when building python bindings"
-Organization: O.S. Systems Software LTDA.
-
-This reverts commit 227703a2ceada3c104edd56756d48455ca4c271a.
-
-Upstream-Status: Pending
-
-Signed-off-by: Otavio Salvador <[email protected]>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4dee4b4..6608bcd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -339,7 +339,7 @@ AM_CONDITIONAL([PYTHON_BINDING], [test "x${enable_python_binding:-yes}" = xyes])
- 
- if test "x${enable_python_binding:-yes}" = xyes; then
-   AX_PKG_SWIG($swig_version, [], [ AC_MSG_ERROR([SWIG $swig_version or newer is needed]) ])
--  AM_PATH_PYTHON([3.0])
-+  AM_PATH_PYTHON
- 
-   AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for python, bypassing python-config])
-   AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config])
--- 
-2.1.4
-
meta/recipes-kernel/lttng/lttng-tools_git.bb +3 -4
index 8ef267c..da2b685 100644
@@ -18,16 +18,15 @@ PV = "2.7.1+git${SRCPV}"
 
 PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
                  am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
-                 PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}' \
+                 PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
 "
 PACKAGECONFIG ??= "lttng-ust"
-PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native"
+PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python3 swig-native"
 PACKAGECONFIG[lttng-ust] = "--enable-lttng-ust, --disable-lttng-ust, lttng-ust"
 PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod"
 PACKAGECONFIG_remove_libc-musl = "lttng-ust"
 
 SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.7 \
-           file://Revert-Build-look-for-python-3.0-when-building-pytho.patch \
            file://stop-using-SIGUNUSED.patch \
            file://runtest-2.4.0.patch \
            file://0001-lttng-tools-filter-random-filename-of-tests-output.patch \
@@ -35,7 +34,7 @@ SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.7 \
 
 S = "${WORKDIR}/git"
 
-inherit autotools-brokensep ptest pkgconfig useradd python-dir
+inherit autotools-brokensep ptest pkgconfig useradd python3-dir
 
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM_${PN} = "tracing"
Signature · 1 line
2.8.1
#26 lore raw

PATCH 26/31 lttng-ust: move to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-kernel/lttng/lttng-ust_git.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-kernel/lttng/lttng-ust_git.bb +8 -1
index 15d925d..f5a12b1 100644
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c963eb366b781252b0bf0fdf1624d9e9 \
 inherit autotools lib_package
 
 DEPENDS = "liburcu util-linux"
-RDEPENDS_${PN}-bin = "python-core"
+RDEPENDS_${PN}-bin = "python3-core"
 
 # For backwards compatibility after rename
 RPROVIDES_${PN} = "lttng2-ust"
@@ -27,6 +27,13 @@ SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.7 \
            file://lttng-ust-add-support-for-aarch64_be.patch \
           "
 
+do_install_append() {
+        # Patch python tools to use Python 3; they should be source compatible, but
+        # still refer to Python 2 in the shebang
+        sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${bindir}/lttng-gen-tp
+}
+
+
 S = "${WORKDIR}/git"
 
 do_configure_prepend () {
Signature · 1 line
2.8.1
#27 lore raw

PATCH 27/31 systemtap: move to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-kernel/systemtap/systemtap_git.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta/recipes-kernel/systemtap/systemtap_git.bb +2 -3
index 97064b8..cf6a96a 100644
@@ -6,13 +6,12 @@ DEPENDS = "elfutils sqlite3 systemtap-native"
 DEPENDS_class-native = "elfutils-native sqlite3-native gettext-native"
 DEPENDS_class-nativesdk = "nativesdk-elfutils nativesdk-sqlite3 nativesdk-gettext"
 
-RDEPENDS_${PN} += "python bash"
-RDEPENDS_${PN}_class-native += "python-native"
-RDEPENDS_${PN}_class-nativesdk += "python-native"
+RDEPENDS_${PN} += "python3-core bash"
 
 EXTRA_OECONF += "--with-libelf=${STAGING_DIR_TARGET} --without-rpm \
             --without-nss --without-avahi --without-dyninst \
             --disable-server --disable-grapher --enable-prologues \
+            --with-python3 \
             ac_cv_prog_have_javac=no \
             ac_cv_prog_have_jar=no "
 
Signature · 1 line
2.8.1
#28 lore raw

PATCH 28/31 libcap-ng: move to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb +7 -5
index 5715467..5608f49 100644
@@ -10,16 +10,18 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
            file://python.patch"
 
-inherit lib_package autotools pythonnative
+inherit lib_package autotools python3native
 
 SRC_URI[md5sum] = "3d7d126b29e2869a0257c17c8b0d9b2e"
 SRC_URI[sha256sum] = "615549ce39b333f6b78baee0c0b4ef18bc726c6bf1cca123dfd89dd963f6d06b"
 
-DEPENDS += "swig-native python"
+DEPENDS += "swig-native python3"
 
-EXTRA_OECONF += "--without-python3"
-
-EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'"
+export PYTHON
+export STAGING_INCDIR
+export STAGING_LIBDIR
+EXTRA_OECONF += "--with-python --with-python3"
+EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'"
 
 PACKAGES += "${PN}-python"
 
Signature · 1 line
2.8.1
#29 lore raw

PATCH 29/31 hwlatdetect: move to Python 3

In reply to Alexander Kanavin
---
 meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb +4 -2
index 025eb63..012b2dd 100644
@@ -6,7 +6,7 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
 require rt-tests.inc
-inherit python-dir
+inherit python3-dir
 
 EXTRA_OEMAKE += "PYLIB=${libdir}/python${PYTHON_BASEVERSION}/dist-packages"
 
@@ -17,8 +17,10 @@ do_compile() {
 do_install() {
         oe_runmake install_hwlatdetect DESTDIR=${D} SBINDIR=${sbindir} \
 	           MANDIR=${mandir} INCLUDEDIR=${includedir}
+
+        sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py
 }
 
 FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py"
-RDEPENDS_${PN} = "python python-subprocess python-textutils"
+RDEPENDS_${PN} = "python3 python3-subprocess python3-textutils"
 RRECOMMENDS_${PN} = "kernel-module-hwlat-detector"
Signature · 1 line
2.8.1
#30 lore raw

PATCH 30/31 python3-numpy: add a recipe

In reply to Alexander Kanavin

This is needed for updating piglit to use Python 3. Python 2 based recipe can be later moved to meta-oe.

---
 .../python-numpy/python3-numpy_1.10.4.bb           | 101 +++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 meta/recipes-devtools/python-numpy/python3-numpy_1.10.4.bb
meta/recipes-devtools/python-numpy/python3-numpy_1.10.4.bb new file +101 -0
new file mode 100644
index 0000000..dcd23ac
@@ -0,0 +1,101 @@
+SUMMARY = "A sophisticated Numeric Processing Package for Python"
+SECTION = "devel/python"
+LICENSE = "PSF"
+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 \
+           file://add-glibc-check.patch \
+           ${CONFIGFILESURI} "
+
+CONFIGFILESURI ?= ""
+
+CONFIGFILESURI_aarch64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_arm = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_armeb = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_mipsel = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_x86 = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_x86-64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips64n32 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+
+S = "${WORKDIR}/numpy-${PV}"
+
+inherit distutils3
+
+# Make the build fail and replace *config.h with proper one
+# This is a ugly, ugly hack - Koen
+do_compile_prepend_class-target() {
+    ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build ${DISTUTILS_BUILD_ARGS} || \
+    true
+    cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
+}
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
+
+SRC_URI[md5sum] = "90bb9034652cefbada19cf7d141a6a61"
+SRC_URI[sha256sum] = "f7f91842056a7cf680b0eaf8cefc5e46c69e2521e651128d2e6aaaccec8652ae"
+
+# install what is needed for numpy.test()
+RDEPENDS_${PN} = "python3-unittest \
+                  python3-difflib \
+                  python3-pprint \
+                  python3-pickle \
+                  python3-shell \
+                  python3-nose \
+                  python3-doctest \
+                  python3-datetime \
+                  python3-distutils \
+                  python3-misc \
+                  python3-mmap \
+                  python3-netclient \
+                  python3-numbers \
+                  python3-pydoc \
+                  python3-pkgutil \
+                  python3-email \
+                  python3-subprocess \
+                  python3-compression \
+                  python3-ctypes \
+                  python3-threading \
+"
+
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.8.1
#31 lore raw

PATCH 31/31 automake: drop the Python scriptlets to determine Python's directories

In reply to Alexander Kanavin

python.m4 has python scriptlets that determine where the system's library directory is. For Python 2.x distutils.sysconfig is used (which works because we patch it), for Python 3.x plain sysconfig is used (which doesn't work for example on x32). There is also a hardcoded fallback if the scriptlets fail.

This commit removes the scriptlets altogether and just uses the hardcoded path always, due to above mentioned issues with x32.

---
 .../automake/automake/python-libdir.patch          | 62 +++++++++++++++-------
 1 file changed, 44 insertions(+), 18 deletions(-)
meta/recipes-devtools/automake/automake/python-libdir.patch +44 -18
index 47541bd..2a48b13 100644
@@ -1,3 +1,8 @@
+From 472a3d36c97ef7535f05d6c185edcbc22b0074c4 Mon Sep 17 00:00:00 2001
+From: Kumar Gala <[email protected]>
+Date: Thu, 11 Aug 2011 01:26:33 -0500
+Subject: [PATCH 1/4] automake: Update for python.m4 to respect libdir
+
 Upstream-Status: Inappropriate [embedded specific]
 
 Signed-off-by: Kumar Gala <[email protected]>
@@ -5,11 +10,17 @@ Signed-off-by: Kumar Gala <[email protected]>
 Updated for automake-1.12.6
 
 Signed-off-by: Marko Lindqvist <[email protected]>
+Signed-off-by: Alexander Kanavin <[email protected]>
+
+---
+ m4/python.m4 | 27 +++++++--------------------
+ 1 file changed, 7 insertions(+), 20 deletions(-)
 
-diff -Nurd automake-1.12.6/m4/python.m4 automake-1.12.6/m4/python.m4
---- automake-1.12.6/m4/python.m4	2012-12-13 22:02:25.000000000 +0200
-+++ automake-1.12.6/m4/python.m4	2012-12-27 17:40:26.558164660 +0200
-@@ -91,12 +91,13 @@
+diff --git a/m4/python.m4 b/m4/python.m4
+index 5b2c695..ed19261 100644
+--- a/m4/python.m4
++++ b/m4/python.m4
+@@ -91,12 +91,13 @@ AC_DEFUN([AM_PATH_PYTHON],
      [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
    AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
  
@@ -25,17 +36,23 @@ diff -Nurd automake-1.12.6/m4/python.m4 automake-1.12.6/m4/python.m4
    AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
  
    dnl At times (like when building shared libraries) you may want
-@@ -148,7 +149,8 @@
- else:
-     from distutils import sysconfig
-     sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
+@@ -141,14 +142,7 @@ except ImportError:
+      else
+        am_py_prefix=$prefix
+      fi
+-     am_cv_python_pythondir=`$PYTHON -c "
+-$am_python_setup_sysconfig
+-if can_use_sysconfig:
+-    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
+-else:
+-    from distutils import sysconfig
+-    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
 -sys.stdout.write(sitedir)"`
-+sys.stdout.write(sitedir)" ||
-+     echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
++     am_cv_python_pythondir=`echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
       case $am_cv_python_pythondir in
       $am_py_prefix*)
         am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
-@@ -158,7 +160,7 @@
+@@ -158,7 +152,7 @@ sys.stdout.write(sitedir)"`
         case $am_py_prefix in
           /usr|/System*) ;;
           *)
@@ -44,17 +61,23 @@ diff -Nurd automake-1.12.6/m4/python.m4 automake-1.12.6/m4/python.m4
  	  ;;
         esac
         ;;
-@@ -190,7 +192,8 @@
- else:
-     from distutils import sysconfig
-     sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
+@@ -183,14 +177,7 @@ sys.stdout.write(sitedir)"`
+      else
+        am_py_exec_prefix=$exec_prefix
+      fi
+-     am_cv_python_pyexecdir=`$PYTHON -c "
+-$am_python_setup_sysconfig
+-if can_use_sysconfig:
+-    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
+-else:
+-    from distutils import sysconfig
+-    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
 -sys.stdout.write(sitedir)"`
-+sys.stdout.write(sitedir)" ||
-+     echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
++     am_cv_python_pyexecdir=`echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"`
       case $am_cv_python_pyexecdir in
       $am_py_exec_prefix*)
         am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
-@@ -200,7 +203,7 @@
+@@ -200,7 +187,7 @@ sys.stdout.write(sitedir)"`
         case $am_py_exec_prefix in
           /usr|/System*) ;;
           *)
@@ -63,3 +86,6 @@ diff -Nurd automake-1.12.6/m4/python.m4 automake-1.12.6/m4/python.m4
  	   ;;
         esac
         ;;
+-- 
+2.8.1
+
Signature · 1 line
2.8.1