Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
03ae9d8b
Commit
03ae9d8b
authored
Apr 25, 2019
by
Paul Monson
Committed by
Steve Dower
Apr 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-35920: Windows 10 ARM32 platform support (GH-11774)
parent
eb3478f2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
6 deletions
+29
-6
_msvccompiler.py
_msvccompiler.py
+14
-2
spawn.py
spawn.py
+1
-1
sysconfig.py
sysconfig.py
+1
-0
util.py
util.py
+13
-3
No files found.
_msvccompiler.py
View file @
03ae9d8b
...
...
@@ -89,13 +89,24 @@ def _find_vc2017():
return
None
,
None
PLAT_SPEC_TO_RUNTIME
=
{
'x86'
:
'x86'
,
'x86_amd64'
:
'x64'
,
'x86_arm'
:
'arm'
,
}
def
_find_vcvarsall
(
plat_spec
):
_
,
best_dir
=
_find_vc2017
()
vcruntime
=
None
if
plat_spec
in
PLAT_SPEC_TO_RUNTIME
:
vcruntime_plat
=
PLAT_SPEC_TO_RUNTIME
[
plat_spec
]
else
:
vcruntime_plat
=
'x64'
if
'amd64'
in
plat_spec
else
'x86'
if
best_dir
:
vcredist
=
os
.
path
.
join
(
best_dir
,
".."
,
".."
,
"redist"
,
"MSVC"
,
"**"
,
"Microsoft.VC141.CRT"
,
"vcruntime140.dll"
)
vcruntime_plat
,
"Microsoft.VC141.CRT"
,
"vcruntime140.dll"
)
try
:
import
glob
vcruntime
=
glob
.
glob
(
vcredist
,
recursive
=
True
)[
-
1
]
...
...
@@ -178,6 +189,7 @@ def _find_exe(exe, paths=None):
PLAT_TO_VCVARS
=
{
'win32'
:
'x86'
,
'win-amd64'
:
'x86_amd64'
,
'win-arm32'
:
'x86_arm'
,
}
# A set containing the DLLs that are guaranteed to be available for
...
...
spawn.py
View file @
03ae9d8b
...
...
@@ -81,7 +81,6 @@ def _spawn_nt(cmd, search_path=1, verbose=0, dry_run=0):
"command %r failed with exit status %d"
%
(
cmd
,
rc
))
if
sys
.
platform
==
'darwin'
:
from
distutils
import
sysconfig
_cfg_target
=
None
_cfg_target_split
=
None
...
...
@@ -95,6 +94,7 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0):
if
sys
.
platform
==
'darwin'
:
global
_cfg_target
,
_cfg_target_split
if
_cfg_target
is
None
:
from
distutils
import
sysconfig
_cfg_target
=
sysconfig
.
get_config_var
(
'MACOSX_DEPLOYMENT_TARGET'
)
or
''
if
_cfg_target
:
...
...
sysconfig.py
View file @
03ae9d8b
...
...
@@ -15,6 +15,7 @@ import re
import
sys
from
.errors
import
DistutilsPlatformError
from
.util
import
get_platform
,
get_host_platform
# These are needed in a couple of spots, so just compute them once.
PREFIX
=
os
.
path
.
normpath
(
sys
.
prefix
)
...
...
util.py
View file @
03ae9d8b
...
...
@@ -15,7 +15,7 @@ from distutils.spawn import spawn
from
distutils
import
log
from
distutils.errors
import
DistutilsByteCompileError
def
get_
platform
():
def
get_
host_platform
():
"""Return a string that identifies the current platform. This is used mainly to
distinguish platform-specific build directories and platform-specific built
distributions. Typically includes the OS name and version and the
...
...
@@ -38,6 +38,8 @@ def get_platform ():
if
os
.
name
==
'nt'
:
if
'amd64'
in
sys
.
version
.
lower
():
return
'win-amd64'
if
'(arm)'
in
sys
.
version
.
lower
():
return
'win-arm32'
return
sys
.
platform
# Set for cross builds explicitly
...
...
@@ -90,8 +92,16 @@ def get_platform ():
return "%s-%s-%s" % (osname, release, machine)
# get_platform ()
def get_platform():
if os.name == '
nt
':
TARGET_TO_PLAT = {
'
x86
' : '
win32
',
'
x64
' : '
win
-
amd64
',
'
arm
' : '
win
-
arm32
',
}
return TARGET_TO_PLAT.get(os.environ.get('
VSCMD_ARG_TGT_ARCH
')) or get_host_platform()
else:
return get_host_platform()
def convert_path (pathname):
"""Return '
pathname
' as a name that will work on the native filesystem,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment