diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-06-27 19:14:05 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-06-27 19:19:52 -0700 |
commit | dc410c112d4a32b2ab2088a434a92496180edafa (patch) | |
tree | 9e722031fbb26711eb85601dff88f4e5a227b0a3 | |
parent | eb88652a6c645be95696bbdee6f44b202c9c58ff (diff) | |
download | python-lxml-dc410c112d4a32b2ab2088a434a92496180edafa.tar.gz |
add support for ucrt binaries on Windows
The majority of the work happend here:
https://github.com/mhils/libxml2-win-binaries
-rw-r--r-- | buildlibxml.py | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/buildlibxml.py b/buildlibxml.py index 6959eb4f..cb3ddf24 100644 --- a/buildlibxml.py +++ b/buildlibxml.py @@ -24,19 +24,28 @@ except: # use pre-built libraries on Windows def download_and_extract_zlatkovic_binaries(destdir): - url = 'ftp://ftp.zlatkovic.com/pub/libxml/' - libs = dict( - libxml2 = None, - libxslt = None, - zlib = None, - iconv = None, - ) - for fn in ftp_listdir(url): - for libname in libs: - if fn.startswith(libname): - assert libs[libname] is None, 'duplicate listings?' - assert fn.endswith('.win32.zip') - libs[libname] = fn + if sys.version_info < (3, 5): + url = 'ftp://ftp.zlatkovic.com/pub/libxml/' + libs = dict( + libxml2 = None, + libxslt = None, + zlib = None, + iconv = None, + ) + for fn in ftp_listdir(url): + for libname in libs: + if fn.startswith(libname): + assert libs[libname] is None, 'duplicate listings?' + assert fn.endswith('.win32.zip') + libs[libname] = fn + else: + url = "https://github.com/mhils/libxml2-win-binaries/releases/download/2016.06.27/" + libs = dict( + libxml2 = "libxml2-2.9.4.win32.zip", + libxslt = "libxslt-1.1.27.win32.zip", + zlib = "zlib-1.2.5.win32.zip", + iconv = "iconv-1.14.win32.zip", + ) if not os.path.exists(destdir): os.makedirs(destdir) for libname, libfn in libs.items(): |