-
Notifications
You must be signed in to change notification settings - Fork 54
Drop dependency on python2 #109
Conversation
|
Ok, the test build failed at running the tests that check for python presence which is actually what we want. I'll update the PR not to use bbappends for tweaking PACKAGECONFIG. |
3c641bf to
b044c5d
Compare
|
For some reason bitbake creates empty package |
|
Added |
meta-refkit/conf/distro/refkit.conf
Outdated
| # drop python2 support | ||
| PACKAGECONFIG_remove_pn-opkg-utils = "python" | ||
| PACKAGECONFIG_remove_pn-libxml2 = "python" | ||
| # there's a bug in bitbake that causes the build-deps QA check to check an empty package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you filed a bug about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yocto is such a nice thing I'm still struggling with how to formulate the bug properly. So far I've come up with this:
Given localdata is a local copy of d after calling localdata.setVar('OVERRIDES', 'libxml2-python') its method getVar() starts to return a whitespace (" ") for localdata.getVar('RDEPENDS') if libxml2-python is made an empty package with PACKAGECONFIG_remove = "python" in a bbappend
But if libxml2-python is made an empty package with PACKAGECONFIG_remove_pn-libxml2 = "python" in a distro config then localdata.getVar('RDEPENDS') returns " python-core"
and that breaks the 'build-deps' QA check because it thinks that libxml2-python actually exists even if it's empty.
Can you get it?
|
Submitted https://bugzilla.yoctoproject.org/show_bug.cgi?id=11374
Hopefully it's clear enough.
…On Tue, Apr 18, 2017 at 2:27 PM, Ismo Puustinen ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In meta-refkit/conf/distro/refkit.conf
<#109 (comment)>
:
> @@ -74,6 +74,13 @@ PACKAGECONFIG_remove_pn-pulseaudio = "avahi"
# leave out readline, gdbm, and db
PACKAGECONFIG_pn-python3 = ""
+# drop python2 support
+PACKAGECONFIG_remove_pn-opkg-utils = "python"
+PACKAGECONFIG_remove_pn-libxml2 = "python"
+# there's a bug in bitbake that causes the build-deps QA check to check an empty package
Have you filed a bug about this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#109 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACCYeik7oR8oDee44IX0o7EL5g-DLh8ks5rxJ4pgaJpZM4M52px>
.
|
|
rebased and force pushed. |
|
@rojkov I have oe-core and bitbake updated in master |
|
Rebased and force pushed. @mythi It seems the oe-core devs oppose the idea that python3 become python at some point in spite of what the python devs themselves believe in [1]. Should we stay with the current workaround or start adding locally maintained patches to ROS scripts to replace shebang lines? |
| # NodeJS needs Python for node-gyp which is a NPM module bundled with | ||
| # GYP together. GYP is a build system generator written in Python that | ||
| # stands for "Generate Your Projects" and is used for building Node | ||
| # modules written in C. Since Refkit doesn't support on-target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't exactly true so let's be careful with the wording. Furthermore, even if refkit did not support this today, a refkit user might.
AFAICS this cripples node-gyp by keeping it installed (via node-npm) but simply drops dependencies to python. How about doing packaging such that npm and node-gyp are in their own packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Submitted ostroproject/meta-iot-web#37 introducing nodejs-gyp, but then the supported recipes check fails even though nodejs-gyp is not installed. It needs to be amended to ignore RDEPENDS for not installed packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually nodejs-npm is not installed on any image. So, it's just the check's greediness issue.
meta-refkit/conf/distro/refkit.conf
Outdated
| # to check an empty package: | ||
| # https://bugzilla.yoctoproject.org/show_bug.cgi?id=11374 | ||
| INSANE_SKIP_libxml2-python =+ "build-deps" | ||
| PACKAGECONFIG_remove_pn-libxml2-native = "python" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this -native part related to that bug?
meta-refkit/conf/distro/refkit.conf
Outdated
| PACKAGECONFIG_pn-python3 = "" | ||
|
|
||
| # drop python2 support | ||
| PACKAGECONFIG_remove_pn-opkg-utils = "python" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does opkg-utils get installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no such package in the image manifests. But the supported recipes check fails if it's missing from refkit-supported-recipes.txt
@pohly could you please help with this? Perhaps it gets pulled because of update-alternatives in coreutils.
|
@rojkov <https://github.com/rojkov> What's the current workaround and why
local ROS patches would be needed? My thinking is #120
<#120> would be the way to
start.
As a workaround I've added a bbappend to python3 that makes it inherit
update-alternatives and create a sym link (/usr/bin/python ->
/usr/bin/python3). Without the link all python scripts that have
/usr/bin/python (/usr/bin/env python) in their shebang line need to be
patched to reference python3 explicitly.
|
|
On Thu, Apr 20, 2017 at 9:57 AM, Dmitry Rozhkov ***@***.***> wrote:
> @rojkov <https://github.com/rojkov> What's the current workaround and
why
> local ROS patches would be needed? My thinking is #120
> <#120> would be the way to
> start.
>
>
As a workaround I've added a bbappend to python3 that makes it inherit
update-alternatives and create a sym link (/usr/bin/python ->
/usr/bin/python3). Without the link all python scripts that have
/usr/bin/python (/usr/bin/env python) in their shebang line need to be
patched to reference python3 explicitly.
OK, I was on the same page. With #120 neither of these would be needed.
Did ROS work with the update-alternatives approach btw?
|
|
OK, I was on the same page. With #120 neither of these would be needed.
Did ROS work with the update-alternatives approach btw?
At least a master ROS node got launched successfully (written in python).
Unofficially ROS supports both versions in its core modules starting from
Indigo [1].
Unfortunately OE-core has dropped python2 bindings for Boost and it forces
switching to python3 if ROS computer vision modules get installed on an
image.
[1] http://wiki.ros.org/indigo/Migration
|
|
@mythi: Boost is difficult to compile so that it works for both Pythons at the same time. See https://bugzilla.yoctoproject.org/show_bug.cgi?id=11104 |
|
On Thu, 2017-04-20 at 00:23 -0700, Dmitry Rozhkov wrote:
There's no such package in the image manifests. But the supported
recipes check fails if it's missing from refkit-supported-recipes.txt
@pohly could you please help with this? Perhaps it gets pulled because
of update-alternatives in coreutils.
If "python" needs to be built, then it must be listed as supported, even
if it does not get installed on the images. There's no distinction
between "installed vs. not installed" target code and that can't be
added because it's simply unknown how the resulting binaries will be
used.
|
|
Ok, I see now. opkg's dep resolver can have different opinion on what to install indeed. |
|
|
|
|
Can one of the admins verify this patch? |
|
6554438 to
556c8b8
Compare
|
There was a problem in CI, where one of the boards froze at test phase. Should be fixed now. |
|
@rojkov please rebase |
|
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
lowpan-tools provides lowpan-tools-python package which is not compatible with python3. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
This is a temporary bbappend until the patch https://patchwork.openembedded.org/patch/139143/ gets accepted upstream. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
No description provided.