Skip to content

Commit

Permalink
Add windows wheel build (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxamin authored Apr 17, 2024
1 parent 3fea8a4 commit 1b3b527
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ jobs:
cibuildwheel --print-build-identifiers --platform linux \
| jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
&& cibuildwheel --print-build-identifiers --platform macos \
| jq -nRc '{"only": inputs, "os": "macos-latest"}'
| jq -nRc '{"only": inputs, "os": "macos-latest"}' \
&& cibuildwheel --print-build-identifiers --platform windows \
| jq -nRc '{"only": inputs, "os": "windows-2019"}'
} | jq -sc
)
echo "include=$MATRIX"
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ environment-pass = [
archs = ["x86_64", "arm64"]
before-all = "brew install perl"

[tool.cibuildwheel.windows]
archs = ["AMD64", "x86"]

[[tool.cibuildwheel.overrides]]
select = "*-manylinux*"
before-all = "yum install -y perl-core"
19 changes: 10 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,19 @@ def run(self):
super(build_ext, self).run()

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

libs = [
'libxml2-2.9.4.{}.zip'.format(suffix),
'libxslt-1.1.29.{}.zip'.format(suffix),
'zlib-1.2.8.{}.zip'.format(suffix),
'iconv-1.14.{}.zip'.format(suffix),
'openssl-1.0.1.{}.zip'.format(suffix),
'xmlsec-1.2.24.{}.zip'.format(suffix),
'libxml2-2.11.7.{}.zip'.format(suffix),
'libxslt-1.1.37.{}.zip'.format(suffix),
'zlib-1.2.12.{}.zip'.format(suffix),
'iconv-1.16-1.{}.zip'.format(suffix),
'openssl-3.0.8.{}.zip'.format(suffix),
'xmlsec-1.3.4.{}.zip'.format(suffix),
]

for libfile in libs:
Expand Down Expand Up @@ -262,7 +262,7 @@ def prepare_static_build_win(self):
ext.libraries = [
'libxmlsec_a',
'libxmlsec-openssl_a',
'libeay32',
'libcrypto',
'iconv_a',
'libxslt_a',
'libexslt_a',
Expand Down Expand Up @@ -599,6 +599,7 @@ def prepare_static_build(self, build_platform):
use_scm_version=True,
description='Python bindings for the XML Security Library',
long_description=long_desc,
long_description_content_type='text/markdown',

This comment has been minimized.

Copy link
@agronholm

agronholm Apr 26, 2024

The README is in RST format. Why would you mark it as markdown?

ext_modules=[pyxmlsec],
cmdclass={'build_ext': build_ext},
python_requires='>=3.5',
Expand Down

0 comments on commit 1b3b527

Please sign in to comment.