File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,10 @@ jobs:
104
104
arch :
105
105
- ' x86'
106
106
- ' x64'
107
+ - ' arm64'
108
+ exclude :
109
+ - py : ' 3.8'
110
+ arch : ' arm64'
107
111
runs-on : ' windows-2022'
108
112
env :
109
113
ZSTD_WARNINGS_AS_ERRORS : ' 1'
@@ -112,14 +116,25 @@ jobs:
112
116
uses : actions/setup-python@v5
113
117
with :
114
118
python-version : ${{ matrix.py }}
115
- architecture : ${{ matrix.arch }}
119
+ architecture : ${{ matrix.arch == 'arm64' && 'x64' || matrix.arch }}
116
120
117
121
- uses : actions/checkout@v4
118
122
119
123
- name : Build Wheel
124
+ if : matrix.arch != 'arm64'
120
125
run : |
121
126
python -m pip wheel -w dist .
122
127
128
+ - name : Build Wheel
129
+ if : matrix.arch == 'arm64'
130
+ shell : bash
131
+ run : |
132
+ python -m pip install cibuildwheel
133
+ export CIBW_ARCHS=ARM64
134
+ export CIBW_BUILD=cp$(echo ${{ matrix.py }} | tr -d .)-*
135
+ export CIBW_BUILD_VERBOSITY=1
136
+ cibuildwheel --output-dir dist --arch ARM64
137
+
123
138
- name : Upload Wheel
124
139
uses : actions/upload-artifact@v4
125
140
with :
Original file line number Diff line number Diff line change 34
34
if sys .version_info [0 :2 ] >= (3 , 13 ):
35
35
MINIMUM_CFFI_VERSION = "1.17"
36
36
37
+ ext_suffix = os .environ .get ("SETUPTOOLS_EXT_SUFFIX" )
38
+ if ext_suffix :
39
+ import sysconfig
40
+ # setuptools._distutils.command.build_ext doesn't use
41
+ # SETUPTOOLS_EXT_SUFFIX like setuptools.command.build_ext does.
42
+ # Work around the issue so that cross-compilation can work
43
+ # properly.
44
+ sysconfig .get_config_vars ()["EXT_SUFFIX" ] = ext_suffix
45
+ try :
46
+ # Older versions of python didn't have EXT_SUFFIX, and setuptools
47
+ # sets its own value, but since we've already set one, we don't
48
+ # want setuptools to overwrite it.
49
+ import setuptools ._distutils .compat .py39 as py39compat
50
+ except ImportError :
51
+ try :
52
+ import setuptools ._distutils .py39compat as py39compat
53
+ except ImportError :
54
+ pass
55
+ if py39compat :
56
+ py39compat .add_ext_suffix = lambda vars : None
57
+
37
58
try :
38
59
import cffi
39
60
You can’t perform that action at this time.
0 commit comments