Skip to content

Commit 570b358

Browse files
committed
DONT MERGE: make sure it's compatible with xmlsec1 RC release
1 parent e24a84c commit 570b358

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/manylinux.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ jobs:
3232
- name: Build linux_x86_64 wheel
3333
env:
3434
PYXMLSEC_STATIC_DEPS: true
35-
PYXMLSEC_LIBXML2_VERSION: 2.14.6 # Lock it to libxml2 2.14.6 until the issue with 2.15.x is resolved; e.g. https://github.com/lsh123/xmlsec/issues/948
35+
# PYXMLSEC_LIBXML2_VERSION: 2.14.6 # Lock it to libxml2 2.14.6 until the issue with 2.15.x is resolved; e.g. https://github.com/lsh123/xmlsec/issues/948
36+
PYXMLSEC_XMLSEC1_VERSION: 1.3.8-rc1
3637
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3738
run: |
3839
/opt/python/${{ matrix.python-abi }}/bin/python -m build

setup.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,16 @@ def latest_xmlsec_release():
106106
return tar_gz['browser_download_url']
107107

108108

109+
def urlretrieve2(url, filename):
110+
req = Request(url, headers={'User-Agent': 'python-xmlsec build'})
111+
with urlopen(req) as r, open(filename, 'wb') as f:
112+
while True:
113+
chunk = r.read(8192)
114+
if not chunk:
115+
break
116+
f.write(chunk)
117+
118+
109119
class CrossCompileInfo:
110120
def __init__(self, host, arch, compiler):
111121
self.host = host
@@ -319,13 +329,13 @@ def prepare_static_build(self, build_platform):
319329
libiconv_tar = self.libs_dir / 'libiconv.tar.gz'
320330
if self.libiconv_version is None:
321331
url = latest_libiconv_release()
322-
self.info('{:10}: {}'.format('zlib', f'PYXMLSEC_LIBICONV_VERSION unset, downloading latest from {url}'))
332+
self.info('{:10}: {}'.format('libiconv', f'PYXMLSEC_LIBICONV_VERSION unset, downloading latest from {url}'))
323333
else:
324334
url = f'https://ftp.gnu.org/pub/gnu/libiconv/libiconv-{self.libiconv_version}.tar.gz'
325335
self.info(
326-
'{:10}: {}'.format('zlib', f'PYXMLSEC_LIBICONV_VERSION={self.libiconv_version}, downloading from {url}')
336+
'{:10}: {}'.format('libiconv', f'PYXMLSEC_LIBICONV_VERSION={self.libiconv_version}, downloading from {url}')
327337
)
328-
urlretrieve(url, str(libiconv_tar))
338+
urlretrieve2(url, str(libiconv_tar))
329339

330340
# fetch libxml2
331341
libxml2_tar = next(self.libs_dir.glob('libxml2*.tar.xz'), None)

0 commit comments

Comments
 (0)