summaryrefslogtreecommitdiff
path: root/buildlibxml.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2017-09-19 09:17:37 +0200
committerStefan Behnel <stefan_ml@behnel.de>2017-09-19 09:17:37 +0200
commitf45e7c6cdb2da43399a1c1f4cd5eb7445bb5a54c (patch)
tree0ef0fc2f3dcac554f0e1ebc756d01783fd40fb85 /buildlibxml.py
parentc75d243e811f6e255733353af5c3e29694d912fa (diff)
downloadpython-lxml-f45e7c6cdb2da43399a1c1f4cd5eb7445bb5a54c.tar.gz
Remove support for building with outdated Zlatkovic binaries completely.
Diffstat (limited to 'buildlibxml.py')
-rw-r--r--buildlibxml.py31
1 files changed, 14 insertions, 17 deletions
diff --git a/buildlibxml.py b/buildlibxml.py
index 4407fa8c..6c9b33ae 100644
--- a/buildlibxml.py
+++ b/buildlibxml.py
@@ -26,24 +26,21 @@ except:
# use pre-built libraries on Windows
def download_and_extract_windows_binaries(destdir):
- arch = "win64" if sys.maxsize > 2**32 else "win32"
+ url = "https://github.com/mhils/libxml2-win-binaries/releases"
+ filenames = list(_list_dir_urllib(url))
+
+ release_path = "/download/%s/" % find_max_version(
+ "library release", filenames, re.compile(r"/releases/tag/([0-9.]+[0-9])$"))
+ url += release_path
+ filenames = [
+ filename.rsplit('/', 1)[1]
+ for filename in filenames
+ if release_path in filename
+ ]
- if False and sys.version_info < (3, 5) and arch == 'win32':
- url = 'ftp://ftp.zlatkovic.com/pub/libxml/'
- filenames = remote_listdir(url)
- else:
- if sys.version_info < (3, 5):
- arch = 'vs2008.' + arch
- url = "https://github.com/mhils/libxml2-win-binaries/releases"
- filenames = list(_list_dir_urllib(url))
- release_path = "/download/%s/" % find_max_version(
- "library release", filenames, re.compile(r"/releases/tag/([0-9.]+[0-9])$"))
- filenames = [
- filename.rsplit('/', 1)[1]
- for filename in filenames
- if release_path in filename
- ]
- url += release_path
+ arch = "win64" if sys.maxsize > 2**32 else "win32"
+ if sys.version_info < (3, 5):
+ arch = 'vs2008.' + arch
libs = {}
for libname in ['libxml2', 'libxslt', 'zlib', 'iconv']: