You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only relevant when %VSCMD_ARG_TGT_ARCH% is set to arm64 (for example, in a configured build environment).
Description
For other values (x86, x64, arm), the VSCMD_ARG_TGT_ARCH variable is used to select the platform specifier (see setuptools/_distutils/util.py line 100ish). There is no value for arm64, and so it builds for the current platform rather than cross-compiling.
Expected behavior
When the value is arm64, it should select platform win-arm64. This allows later steps to select the correct build tools and cross-compile.
Note that you also need to [obtain and] ensure that setuptools will find the ARM64 compatible .lib files for Python. Putting them into a venv's libs directory works fine (provided you make sure the build happens in that venv, which is not hard).
How to Reproduce
Open regular command prompt
set VSCMD_ARG_TGT_ARCH=arm64
pip wheel --no-binary :all: --no-deps --no-cache --no-build-isolation markupsafe (or any other simple module with native code)
The generated wheel will be for the same platform as the Python it was run with, rather than respecting the target architecture.
If you set VSCMD_ARG_TGT_ARCH=arm without getting the right libs, the compilation fails and it generates a none-any wheel because markupsafe knows how to handle this. Other packages will just hard fail.
Output
Collecting markupsafe Downloading MarkupSafe-2.0.1.tar.gz (18 kB) Building wheels for collected packages: markupsafe Building wheel for markupsafe (setup.py) ... done Created wheel for markupsafe: filename=MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl size=17214 sha256=cd682d318cfd3a5805c032fa6b1d9e40def490f62be7b4057fcd67cf4f6cc1dc Stored in directory: C:\...\Temp\pip-ephem-wheel-cache-lgs8awq4\wheels\9f\6d\c8\1f59b07cf85ae842908006ec28f4477f7e4578df72c3eb0e46 Successfully built markupsafe
Note that the wheel platform is win32 or win_amd64, and not win_arm64.
Code of Conduct
I agree to follow the PSF Code of Conduct
The text was updated successfully, but these errors were encountered:
setuptools version
latest
Python version
any
OS
Windows
Additional environment information
Only relevant when
%VSCMD_ARG_TGT_ARCH%
is set toarm64
(for example, in a configured build environment).Description
For other values (
x86
,x64
,arm
), theVSCMD_ARG_TGT_ARCH
variable is used to select the platform specifier (see setuptools/_distutils/util.py line 100ish). There is no value forarm64
, and so it builds for the current platform rather than cross-compiling.Expected behavior
When the value is
arm64
, it should select platformwin-arm64
. This allows later steps to select the correct build tools and cross-compile.Note that you also need to [obtain and] ensure that setuptools will find the ARM64 compatible .lib files for Python. Putting them into a venv's
libs
directory works fine (provided you make sure the build happens in that venv, which is not hard).How to Reproduce
set VSCMD_ARG_TGT_ARCH=arm64
pip wheel --no-binary :all: --no-deps --no-cache --no-build-isolation markupsafe
(or any other simple module with native code)The generated wheel will be for the same platform as the Python it was run with, rather than respecting the target architecture.
If you
set VSCMD_ARG_TGT_ARCH=arm
without getting the right libs, the compilation fails and it generates anone-any
wheel because markupsafe knows how to handle this. Other packages will just hard fail.Output
Note that the wheel platform is
win32
orwin_amd64
, and notwin_arm64
.Code of Conduct
The text was updated successfully, but these errors were encountered: