Skip to content

Commit 1b3b527

Browse files
authored
Add windows wheel build (#313)
1 parent 3fea8a4 commit 1b3b527

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

.github/workflows/wheels.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ jobs:
8181
cibuildwheel --print-build-identifiers --platform linux \
8282
| jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
8383
&& cibuildwheel --print-build-identifiers --platform macos \
84-
| jq -nRc '{"only": inputs, "os": "macos-latest"}'
84+
| jq -nRc '{"only": inputs, "os": "macos-latest"}' \
85+
&& cibuildwheel --print-build-identifiers --platform windows \
86+
| jq -nRc '{"only": inputs, "os": "windows-2019"}'
8587
} | jq -sc
8688
)
8789
echo "include=$MATRIX"

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ environment-pass = [
7979
archs = ["x86_64", "arm64"]
8080
before-all = "brew install perl"
8181

82+
[tool.cibuildwheel.windows]
83+
archs = ["AMD64", "x86"]
84+
8285
[[tool.cibuildwheel.overrides]]
8386
select = "*-manylinux*"
8487
before-all = "yum install -y perl-core"

setup.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -213,19 +213,19 @@ def run(self):
213213
super(build_ext, self).run()
214214

215215
def prepare_static_build_win(self):
216-
release_url = 'https://github.com/bgaifullin/libxml2-win-binaries/releases/download/v2018.08/'
217-
if sys.maxsize > 2147483647:
216+
release_url = 'https://github.com/mxamin/python-xmlsec-win-binaries/releases/download/2024.04.17/'
217+
if sys.maxsize > 2147483647: # 2.0 GiB
218218
suffix = 'win64'
219219
else:
220220
suffix = 'win32'
221221

222222
libs = [
223-
'libxml2-2.9.4.{}.zip'.format(suffix),
224-
'libxslt-1.1.29.{}.zip'.format(suffix),
225-
'zlib-1.2.8.{}.zip'.format(suffix),
226-
'iconv-1.14.{}.zip'.format(suffix),
227-
'openssl-1.0.1.{}.zip'.format(suffix),
228-
'xmlsec-1.2.24.{}.zip'.format(suffix),
223+
'libxml2-2.11.7.{}.zip'.format(suffix),
224+
'libxslt-1.1.37.{}.zip'.format(suffix),
225+
'zlib-1.2.12.{}.zip'.format(suffix),
226+
'iconv-1.16-1.{}.zip'.format(suffix),
227+
'openssl-3.0.8.{}.zip'.format(suffix),
228+
'xmlsec-1.3.4.{}.zip'.format(suffix),
229229
]
230230

231231
for libfile in libs:
@@ -262,7 +262,7 @@ def prepare_static_build_win(self):
262262
ext.libraries = [
263263
'libxmlsec_a',
264264
'libxmlsec-openssl_a',
265-
'libeay32',
265+
'libcrypto',
266266
'iconv_a',
267267
'libxslt_a',
268268
'libexslt_a',
@@ -599,6 +599,7 @@ def prepare_static_build(self, build_platform):
599599
use_scm_version=True,
600600
description='Python bindings for the XML Security Library',
601601
long_description=long_desc,
602+
long_description_content_type='text/markdown',
602603
ext_modules=[pyxmlsec],
603604
cmdclass={'build_ext': build_ext},
604605
python_requires='>=3.5',

0 commit comments

Comments
 (0)