File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 45
45
cmake --build ${{github.workspace}}/build_win32 --config Release --target install --parallel 8
46
46
cmake -A x64 -B ${{github.workspace}}/build_amd64 -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/root_amd64
47
47
cmake --build ${{github.workspace}}/build_amd64 --config Release --target install --parallel 8
48
+ cmake -A arm64 -B ${{github.workspace}}/build_arm64 -DSPM_ENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/root_arm64
49
+ cmake --build ${{github.workspace}}/build_arm64 --config Release --target install --parallel 8
48
50
49
51
- name : Build for Mac
50
52
if : runner.os == 'macOS'
66
68
env :
67
69
CIBW_ARCHS_LINUX : auto aarch64
68
70
CIBW_ARCHS_MACOS : x86_64 universal2 arm64
71
+ CIBW_ARCHS_WINDOWS : auto ARM64
69
72
CIBW_SKIP : " pp* *-musllinux_*"
70
73
CIBW_BUILD_VERBOSITY : 1
71
74
Original file line number Diff line number Diff line change @@ -104,13 +104,21 @@ def build_extension(self, ext):
104
104
_build_ext .build_extension (self , ext )
105
105
106
106
107
- if os .name == 'nt' :
108
- # Must pre-install sentencepice into build directory.
107
+ def get_win_arch ():
109
108
arch = 'win32'
110
109
if sys .maxsize > 2 ** 32 :
111
110
arch = 'amd64'
112
111
if 'arm' in platform .machine ().lower ():
113
112
arch = 'arm64'
113
+ if os .getenv ('PYTHON_ARCH' , '' ) == 'ARM64' :
114
+ # Special check for arm64 under ciwheelbuild, see https://github.com/pypa/cibuildwheel/issues/1942
115
+ arch = 'arm64'
116
+ return arch
117
+
118
+
119
+ if os .name == 'nt' :
120
+ # Must pre-install sentencepice into build directory.
121
+ arch = get_win_arch ()
114
122
if os .path .exists ('..\\ build\\ root_{}\\ lib' .format (arch )):
115
123
cflags = ['/std:c++17' , '/I..\\ build\\ root_{}\\ include' .format (arch )]
116
124
libs = [
You can’t perform that action at this time.
0 commit comments