Package: mpi4py Version: 1.3.1+hg20131106-2 Severity: important Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu wily ubuntu-patch
Hi folks, In preparing the transition to python3.5 by default in Ubuntu, we've found that mpi4py fails to build and/or misbuilds (depending on the architecture) against python3.5, because it uses the _Py_char2wchar() function. This function has been renamed to Py_DecodeLocale() in python3.5. The attach patch fixes this issue. Note that I've filed this bug at severity: important, but once python3.5 is added to the list of supported versions in Debian, this will become a serious bug. Thanks for considering the patch. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -Nru mpi4py-1.3.1+hg20131106/debian/patches/python3.5-compat mpi4py-1.3.1+hg20131106/debian/patches/python3.5-compat --- mpi4py-1.3.1+hg20131106/debian/patches/python3.5-compat 1969-12-31 16:00:00.000000000 -0800 +++ mpi4py-1.3.1+hg20131106/debian/patches/python3.5-compat 2015-07-27 19:21:28.000000000 -0700 @@ -0,0 +1,20 @@ +Author: Steve Langasek <steve.langa...@ubuntu.com> +Description: update code for python3.5 compatibility + In python3.5, _Py_char2wchar has been renamed to Py_DecodeLocale. Update + the code accordingly. + +Index: mpi4py-1.3.1+hg20131106/src/python.c +=================================================================== +--- mpi4py-1.3.1+hg20131106.orig/src/python.c ++++ mpi4py-1.3.1+hg20131106/src/python.c +@@ -125,7 +125,9 @@ + setlocale(LC_ALL, ""); + + for (i=0; i<argc; i++) { +-#if defined(__APPLE__) && PY_VERSION_HEX >= 0x03020000 ++#if PY_VERSION_HEX >= 0x03050000 ++ args[i] = Py_DecodeLocale(argv[i], NULL); ++#elif defined(__APPLE__) && PY_VERSION_HEX >= 0x03020000 + args[i] = _Py_DecodeUTF8_surrogateescape(argv[i], strlen(argv[i])); + #else + args[i] = _Py_char2wchar(argv[i], NULL); diff -Nru mpi4py-1.3.1+hg20131106/debian/patches/series mpi4py-1.3.1+hg20131106/debian/patches/series --- mpi4py-1.3.1+hg20131106/debian/patches/series 2014-11-24 06:21:30.000000000 -0800 +++ mpi4py-1.3.1+hg20131106/debian/patches/series 2015-07-27 19:07:24.000000000 -0700 @@ -1,2 +1,3 @@ up_no_modlibs up_tests_network_attr +python3.5-compat