Skip to content

Commit 0a8bce0

Browse files
authored
Merge pull request python#13 from paulmon/win-arm32-fixes
fix importlib and distutils formatting of platform tag for ARM
2 parents f01f3c6 + 1e2d615 commit 0a8bce0

File tree

111 files changed

+249
-257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+249
-257
lines changed

Lib/_osx_support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _find_executable(executable, path=None):
3838
paths = path.split(os.pathsep)
3939
base, ext = os.path.splitext(executable)
4040

41-
if (sys.platform.startswith('win')) and (ext != '.exe'):
41+
if (sys.platform == 'win32') and (ext != '.exe'):
4242
executable = executable + '.exe'
4343

4444
if not os.path.isfile(executable):

Lib/_pyio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import sys
1111
# Import _thread instead of threading to reduce startup cost
1212
from _thread import allocate_lock as Lock
13-
if sys.platform in {'win32', 'win-arm', 'cygwin'}:
13+
if sys.platform in {'win32', 'cygwin'}:
1414
from msvcrt import setmode as _setmode
1515
else:
1616
_setmode = None

Lib/asyncio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
tasks.__all__ +
3636
transports.__all__)
3737

38-
if sys.platform.startswith('win'): # pragma: no cover
38+
if sys.platform == 'win32': # pragma: no cover
3939
from .windows_events import *
4040
__all__ += windows_events.__all__
4141
else:

Lib/asyncio/unix_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
)
3333

3434

35-
if sys.platform.startswith('win'): # pragma: no cover
35+
if sys.platform == 'win32': # pragma: no cover
3636
raise ImportError('Signals are not really supported on Windows')
3737

3838

Lib/asyncio/windows_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import sys
44

5-
if not sys.platform.startswith('win'): # pragma: no cover
5+
if sys.platform != 'win32': # pragma: no cover
66
raise ImportError('win32 only')
77

88
import _winapi

Lib/ctypes/test/test_bytes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class X(Structure):
5252
self.assertEqual(x.a, "abc")
5353
self.assertEqual(type(x.a), str)
5454

55-
@unittest.skipUnless(sys.platform.startswith("win"), 'Windows-specific test')
55+
@unittest.skipUnless(sys.platform == "win32", 'Windows-specific test')
5656
def test_BSTR(self):
5757
from _ctypes import _SimpleCData
5858
class BSTR(_SimpleCData):

Lib/ctypes/test/test_find.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Test_OpenGL_libs(unittest.TestCase):
1010
@classmethod
1111
def setUpClass(cls):
1212
lib_gl = lib_glu = lib_gle = None
13-
if sys.platform.startswith("win"):
13+
if sys.platform == "win32":
1414
lib_gl = find_library("OpenGL32")
1515
lib_glu = find_library("Glu32")
1616
elif sys.platform == "darwin":

Lib/ctypes/test/test_functions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import _ctypes_test
1919
dll = CDLL(_ctypes_test.__file__)
20-
if sys.platform.startswith("win"):
20+
if sys.platform == "win32":
2121
windll = WinDLL(_ctypes_test.__file__)
2222

2323
class POINT(Structure):
@@ -341,7 +341,7 @@ class S2H(Structure):
341341
s2h = dll.ret_2h_func(inp)
342342
self.assertEqual((s2h.x, s2h.y), (99*2, 88*3))
343343

344-
@unittest.skipUnless(sys.platform.startswith("win"), 'Windows-specific test')
344+
@unittest.skipUnless(sys.platform == "win32", 'Windows-specific test')
345345
def test_struct_return_2H_stdcall(self):
346346
class S2H(Structure):
347347
_fields_ = [("x", c_short),
@@ -369,7 +369,7 @@ class S8I(Structure):
369369
self.assertEqual((s8i.a, s8i.b, s8i.c, s8i.d, s8i.e, s8i.f, s8i.g, s8i.h),
370370
(9*2, 8*3, 7*4, 6*5, 5*6, 4*7, 3*8, 2*9))
371371

372-
@unittest.skipUnless(sys.platform.startswith("win"), 'Windows-specific test')
372+
@unittest.skipUnless(sys.platform == "win32", 'Windows-specific test')
373373
def test_struct_return_8H_stdcall(self):
374374
class S8I(Structure):
375375
_fields_ = [("a", c_int),

Lib/ctypes/test/test_pointers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def test_pointers_bool(self):
192192
self.assertEqual(bool(CFUNCTYPE(None)(42)), True)
193193

194194
# COM methods are boolean True:
195-
if sys.platform.startswith("win"):
195+
if sys.platform == "win32":
196196
mth = WINFUNCTYPE(None)(42, "name", (), None)
197197
self.assertEqual(bool(mth), True)
198198

Lib/ctypes/test/test_random_things.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def callback_func(arg):
55
42 / arg
66
raise ValueError(arg)
77

8-
@unittest.skipUnless(sys.platform.startswith("win"), 'Windows-specific test')
8+
@unittest.skipUnless(sys.platform == "win32", 'Windows-specific test')
99
class call_function_TestCase(unittest.TestCase):
1010
# _ctypes.call_function is deprecated and private, but used by
1111
# Gary Bishp's readline module. If we have it, we must test it as well.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy