Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Readme.md

Build PyWin32 on Windows ARM64

PyWin32 is a critical piece in the Windows Python ecosystem, required for cloudbase-init, nova, etc.

PyWin32 sources: https://github.com/mhammond/pywin32.

Requirements:

  • Visual Studio 2017 or 2019.
    See vsconfig.txt for Visual Studio installation configuration.
  • Windows 10 ADK
  • Python 3.8.x or higher

Build for ARM64

To build it on ARM64, these patches are required:

Grab a cup of coffee, as it takes a while (around 30 minutes).

Example batch script (using VS2019 and Windows 10 SDK 10.0.17763.0):

set VCVARSALL="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat"
set MC_PATH="C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\arm64\mc.exe"
call %VCVARSALL% x86_arm64 10.0.17763.0 & set

pushd "win32\src"
    %MC_PATH% -A PythonServiceMessages.mc -h .
popd

pushd "isapi\src"
    %MC_PATH% -A pyISAPI_messages.mc -h .
popd

mkdir "build\temp.win-arm64-3.9\Release\scintilla" 1>nul 2>nul
echo '' > "build\temp.win-arm64-3.9\Release\scintilla\scintilla.dll"

mkdir "build\temp.win-arm64-3.8\Release\scintilla" 1>nul 2>nul
echo '' > "build\temp.win-arm64-3.8\Release\scintilla\scintilla.dll"

python.exe setup.py install --skip-verstamp

Notes

The first patch disables pythonwin_extensions build. More investigation is required to build them.