[issue20305] Android's incomplete locale.h implementation prevents compilation

2014-01-19 Thread Shiz
New submission from Shiz: As a result of Android's relatively incomplete locale.h implementation[1], some functions are not defined and some standard structs are lacking fields (e.g. decimal_point, thousand_sep). This prevents proper cross-compilation using the Android NDK[2] from succeeding

[issue20305] Android's incomplete locale.h implementation prevents cross-compilation

2014-01-19 Thread Shiz
Changes by Shiz h...@shiz.me: -- title: Android's incomplete locale.h implementation prevents compilation - Android's incomplete locale.h implementation prevents cross-compilation ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2014-01-19 Thread Shiz
New submission from Shiz: As the title states, mkpwent() in pwdmodule.c accesses `pw_gecos`, which is not defined for struct passwd in Bionic, Android's C library. Attached is a patch that works around the issue by setting the field to None on Android. -- components: Cross-Build

[issue20307] Android's failure to expose SYS_* system call constants causes _posixsubprocess cross-compilation to fail

2014-01-19 Thread Shiz
New submission from Shiz: Bionic, Android's C library, fails to expose the SYS_* constants used for the syscall(1) interface, which causes compilation of the _posixsubprocess module to fail as it directly attempts to call SYS_getdents64. Attached is an experimental patch that manually defines

[issue20307] Android's failure to expose SYS_* system call constants causes _posixsubprocess cross-compilation to fail

2014-01-19 Thread Shiz
Shiz added the comment: I of course meant the syscall(2) interface, not syscall(1). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20307

[issue20305] Android's incomplete locale.h implementation prevents cross-compilation

2014-01-20 Thread Shiz
Shiz added the comment: I managed to cross-compile Python 3.3.3 for arm-linux-androideabi (using the Android NDK r9c) with the patches in this issue, issue 20306 and issue 20307. It did require a small additional patch which addressed the fact that the host system can't run the generated

[issue20305] Android's incomplete locale.h implementation prevents cross-compilation

2014-01-20 Thread Shiz
Shiz added the comment: c) Many (or all) core committers did not have access to the platform in question. I'd say Android is quite a common platform these days, although I'd concur that it's not particularly easy to run Python OOTB on. :) Wikipedia claims that QEMU also powers

[issue20307] Android's failure to expose SYS_* system call constants causes _posixsubprocess cross-compilation to fail

2014-01-20 Thread Shiz
Shiz added the comment: That's probably a good idea. Fixed patch attached. -- Added file: http://bugs.python.org/file33584/Python-3.4.0tip-expose-SYS_getdents64-on-android-v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue20307] Android's failure to expose SYS_* system call constants causes _posixsubprocess cross-compilation to fail

2014-01-20 Thread Shiz
Shiz added the comment: Please take note of the discussion in issue 20305 if you were planning to merge this, by the way. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20307

[issue20306] Lack of pw_gecos field in Android's struct passwd causes cross-compilation for the pwd module to fail

2014-04-28 Thread Shiz
Shiz added the comment: Ah, yes, if it's not actually mandated by POSIX, something like HAVE_PASSWD_PW_GECOS would be more appropriate. I'll rework the patch into something more generic. -- ___ Python tracker rep...@bugs.python.org http

[issue22100] Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD.

2014-07-29 Thread Shiz
New submission from Shiz: Currently, when cross-compiling, the configure script doesn't take $HOSTPYTHON into account when determining $PYTHON_FOR_BUILD. This can lead to a wrong Python interpreter being used for several critical cross-compilation stages, leading to compilation errors[1

[issue22100] Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD.

2014-07-29 Thread Shiz
Changes by Shiz h...@shiz.me: -- versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22100 ___ ___ Python-bugs-list

[issue22100] Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD.

2014-07-31 Thread Shiz
Shiz added the comment: After some further investigation it seems the which-clause fails when given a relative path. Since we should expect $HOSTPYTHON to be present in the first place, I modified the patch a bit to special-case the $HOSTPYTHON check, and fall back on the other interpreters

[issue22100] Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD.

2014-08-04 Thread Shiz
Shiz added the comment: And a last tiny fix: on a lot of systems (except apparently the system I was using for my main testing), a freshly-built HOSTPYTHON will be confused to look for libraries, and the invocation will fail because it can't bootstrap itself. Point it to the current Python

[issue23773] importlib does not properly remove frames when invoking external import hooks

2015-03-24 Thread Shiz
New submission from Shiz: When adding a custom module loader to sys.meta_path, importlib does not properly remove its frames before invoking it. This results in a weird traceback with importlib._bootstrap frames in if an error occurs during load_module(), like such: Traceback (most recent

[issue23773] importlib does not properly remove frames when invoking external import hooks

2015-04-13 Thread Shiz
Shiz added the comment: Ah, that is a very good point. I'll run the suite as soon as I find the time and will report back. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23773

[issue25468] PyTraceBack_Print()/_Py_DisplaySourceLine() should take custom loaders into account

2015-10-25 Thread Shiz
New submission from Shiz: Currently, when an error occurs in a module loaded through a loader in sys.meta_path with no direct file name correlation on the filesystem, the traceback source line is empty as such: File "/Users/mark/Development/Projects/Rave/rave/rave/game.py", line 6