Skip to content

Commit 32cf1ac

Browse files
author
Xavier de Gaye
committed
Issue python#28849: Do not define sys.implementation._multiarch on Android.
1 parent ebb39bc commit 32cf1ac

4 files changed

Lines changed: 9 additions & 48 deletions

File tree

Lib/test/test_sysconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,8 @@ def test_SO_in_vars(self):
385385
self.assertIsNotNone(vars['SO'])
386386
self.assertEqual(vars['SO'], vars['EXT_SUFFIX'])
387387

388-
@unittest.skipUnless(sys.platform == 'linux', 'Linux-specific test')
388+
@unittest.skipUnless(hasattr(sys.implementation, '_multiarch'),
389+
'multiarch-specific test')
389390
def test_triplet_in_ext_suffix(self):
390391
import ctypes, platform, re
391392
machine = platform.machine()
@@ -395,7 +396,6 @@ def test_triplet_in_ext_suffix(self):
395396
if re.match('(i[3-6]86|x86_64)$', machine):
396397
if ctypes.sizeof(ctypes.c_char_p()) == 4:
397398
self.assertTrue(suffix.endswith('i386-linux-gnu.so') or
398-
suffix.endswith('i686-linux-android.so') or
399399
suffix.endswith('x86_64-linux-gnux32.so'),
400400
suffix)
401401
else: # 8 byte pointer size

Misc/NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ Tests
4444
- Issue #26939: Add the support.setswitchinterval() function to fix
4545
test_functools hanging on the Android armv7 qemu emulator.
4646

47+
Build
48+
-----
49+
50+
- Issue #28849: Do not define sys.implementation._multiarch on Android.
51+
4752

4853
What's New in Python 3.6.0 release candidate 1
4954
==============================================

configure

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5218,29 +5218,7 @@ cat >> conftest.c <<EOF
52185218
#undef sparc
52195219
#undef unix
52205220
#if defined(__ANDROID__)
5221-
# if defined(__x86_64__) && defined(__LP64__)
5222-
x86_64-linux-android
5223-
# elif defined(__i386__)
5224-
i686-linux-android
5225-
# elif defined(__aarch64__) && defined(__AARCH64EL__)
5226-
# if defined(__ILP32__)
5227-
aarch64_ilp32-linux-android
5228-
# else
5229-
aarch64-linux-android
5230-
# endif
5231-
# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5232-
arm-linux-androideabi
5233-
# elif defined(__mips_hard_float) && defined(_MIPSEL)
5234-
# if _MIPS_SIM == _ABIO32
5235-
mipsel-linux-android
5236-
# elif _MIPS_SIM == _ABI64
5237-
mips64el-linux-android
5238-
# else
5239-
# error unknown platform triplet
5240-
# endif
5241-
# else
5242-
# error unknown platform triplet
5243-
# endif
5221+
# Android is not a multiarch system.
52445222
#elif defined(__linux__)
52455223
# if defined(__x86_64__) && defined(__LP64__)
52465224
x86_64-linux-gnu

configure.ac

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -770,29 +770,7 @@ cat >> conftest.c <<EOF
770770
#undef sparc
771771
#undef unix
772772
#if defined(__ANDROID__)
773-
# if defined(__x86_64__) && defined(__LP64__)
774-
x86_64-linux-android
775-
# elif defined(__i386__)
776-
i686-linux-android
777-
# elif defined(__aarch64__) && defined(__AARCH64EL__)
778-
# if defined(__ILP32__)
779-
aarch64_ilp32-linux-android
780-
# else
781-
aarch64-linux-android
782-
# endif
783-
# elif defined(__ARM_EABI__) && defined(__ARMEL__)
784-
arm-linux-androideabi
785-
# elif defined(__mips_hard_float) && defined(_MIPSEL)
786-
# if _MIPS_SIM == _ABIO32
787-
mipsel-linux-android
788-
# elif _MIPS_SIM == _ABI64
789-
mips64el-linux-android
790-
# else
791-
# error unknown platform triplet
792-
# endif
793-
# else
794-
# error unknown platform triplet
795-
# endif
773+
# Android is not a multiarch system.
796774
#elif defined(__linux__)
797775
# if defined(__x86_64__) && defined(__LP64__)
798776
x86_64-linux-gnu

0 commit comments

Comments
 (0)