msg281344 - (view) |
Author: Xavier de Gaye (xdegaye) *  |
Date: 2016-11-21 10:19 |
The patch fixes the following error: ====================================================================== ERROR: test_lockf (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_posix.py", line 195, in test_lockf posix.lockf(fd, posix.F_LOCK, 4) AttributeError: module 'posix' has no attribute 'F_LOCK' |
|
|
msg283752 - (view) |
Author: (yan12125) * |
Date: 2016-12-21 12:36 |
FYI: Since Android NDK r14 beta1, F_LOCK is defined in unified headers. [1] In $ANDROID_NDK/sysroot/usr/include/bits/lockf.h: #define F_ULOCK 0 #define F_LOCK 1 #define F_TLOCK 2 #define F_TEST 3 [1] https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md |
|
|
msg283758 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2016-12-21 14:54 |
> The patch fixes the following error: Do you mean that the patch adds posix.F_LOCK constant on Android? |
|
|
msg283759 - (view) |
Author: Xavier de Gaye (xdegaye) *  |
Date: 2016-12-21 15:12 |
No, the patch prevents posix.flock() to be defined on Android API 24 with android-ndk-r13. But I plan to change it so that the test is skipped when posix does not have the F_LOCK attribute as this problem is not worth a change in the build machinery. It makes even more sense now that android-ndk-r14 will be released with "Unified Headers". BTW thanks Chi Hsuan Yen for this important information. |
|
|
msg283767 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2016-12-21 16:28 |
Oh ok, the issue is more subtle than what I understood. I reviewed test_posix_flock.patch and proposed some changes to the comment/doc. |
|
|
msg283781 - (view) |
Author: Xavier de Gaye (xdegaye) *  |
Date: 2016-12-21 20:33 |
Thanks for the review Victor. I have created issue 29040: building Android with android-ndk-r14. |
|
|
msg283785 - (view) |
Author: Xavier de Gaye (xdegaye) *  |
Date: 2016-12-21 21:09 |
New patch. Please use autoreconf before running the patch (autoreconf instead of autoconf because the description of HAVE_LOCKF has been updated). |
|
|
msg283788 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2016-12-21 21:57 |
The new patch now looks good to me. |
|
|
msg283823 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2016-12-22 09:41 |
New changeset 51b09b10d4f8 by Xavier de Gaye in branch '3.6': Issue #28762: lockf() is available on Android API level 24, but the https://hg.python.org/cpython/rev/51b09b10d4f8 New changeset 146157d91283 by Xavier de Gaye in branch 'default': Issue #28762: Merge 3.6. https://hg.python.org/cpython/rev/146157d91283 |
|
|
msg306634 - (view) |
Author: Xavier de Gaye (xdegaye) *  |
Date: 2017-11-21 09:06 |
This change is not needed anymore now that Unified Headers are supported by android-ndk-r14 (see issue 29040) |
|
|
msg306801 - (view) |
Author: Xavier de Gaye (xdegaye) *  |
Date: 2017-11-23 11:01 |
New changeset 5ce1069a6ff0d5443074d33ba1d403ccd2eaf3d3 by xdegaye in branch 'master': bpo-28762: Revert last commit (now using Android Unified Headers) (GH-4488) https://github.com/python/cpython/commit/5ce1069a6ff0d5443074d33ba1d403ccd2eaf3d3 |
|
|