Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: support simultaneous Python2 and Python3 #2083

Merged
merged 5 commits into from Oct 13, 2017
Merged

Python: support simultaneous Python2 and Python3 #2083

merged 5 commits into from Oct 13, 2017

Conversation

MilhouseVH
Copy link
Contributor

@MilhouseVH MilhouseVH commented Oct 10, 2017

Python 2.7.14 changelog
Python 3.6.3 changelog

Buildroot Python3 patches: https://github.com/buildroot/buildroot/tree/master/package/python3

Python3:host is going to be needed to build systemd-235 with meson.

Python3:target is not yet required, but longer term Kodi may switch to Python3, so this also gets us some of the way there.

Samba will continue to use only Python2 for the foreseeable future.

In general this PR:

  • Removes hard-coding of python2.7 - this is now determined from the relevant Python{2,3} package
  • Default $TOOLCHAIN/bin/python will be switched automatically according to Python{2,3} dependency

@lrusak
Copy link
Member

lrusak commented Oct 11, 2017

I have to add this patch to dbus-python to get it to build. I'm not sure why but it is the only package that had a problem

diff --git a/packages/python/system/dbus-python/package.mk b/packages/python/system/dbus-python/package.mk
index 02c1c0a..afb3525 100644
--- a/packages/python/system/dbus-python/package.mk
+++ b/packages/python/system/dbus-python/package.mk
@@ -32,6 +32,7 @@ PKG_IS_ADDON="no"
 PKG_AUTORECONF="no"
 
 pre_configure_target() {
+  export PYTHON_CONFIG="$SYSROOT_PREFIX/usr/bin/python2-config"
   export PYTHON_INCLUDES="$($SYSROOT_PREFIX/usr/bin/python2-config --includes)"
   export PYTHON_LIBS="$($SYSROOT_PREFIX/usr/bin/python2-config --ldflags)"
 }

@MilhouseVH
Copy link
Contributor Author

Updated.

Copy link
Member

@lrusak lrusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@lrusak lrusak merged commit 9f238ab into LibreELEC:master Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants