Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Replace ftplib with urllib to pick up ftp_proxy when building lxml with STATIC_DEPS=true #189
I'm not sure if this pull-request has right direction but I've made small change to overcome following problem which I have. It'll be more than great if you'd merge this PR, provide feedback on this PR or anything else. Thanks in advance.
However, build of lxml fails on CI servers because of no direct access to the Internet; Other modules are able to be installed through proxy server (with
Thank you for your comment.
The '54' is because of LIST command in urllib (instead of NLST with ftplib); Here's what FTP server replays in case of direct access to FTP server. The '54' shouldn't be a problem as long as FTP server is running on Unix.
So how should I put explanation there? Shall I insert
The correct way to do this is to not cut off a fixed length prefix, but to split the line into 9 parts (
added a commit
this pull request
Mar 8, 2016
Hi, this breaks version detection on my pc.
I had to make following patch:
def download_libxml2(dest_dir, version=None): """Downloads libxml2, returning the filename where the library was downloaded""" - version_re = re.compile(r'^LATEST_LIBXML2_IS_(.*)$') + version_re = re.compile(r'^-> libxml2-([0-9.]+[0-9]).tar.gz$') filename = 'libxml2-%s.tar.gz' return download_library(dest_dir, LIBXML2_LOCATION, 'libxml2', version_re, filename, version=version) def download_libxslt(dest_dir, version=None): """Downloads libxslt, returning the filename where the library was downloaded""" - version_re = re.compile(r'^LATEST_LIBXSLT_IS_(.*)$') + version_re = re.compile(r'^-> libxslt-([0-9.]+[0-9]).tar.gz$') filename = 'libxslt-%s.tar.gz' return download_library(dest_dir, LIBXML2_LOCATION, 'libxslt', version_re, filename, version=version)
as a workaround
Sorry for my breaking build on your pc. I suppose build is now broken on non-Windows environment because of difference between ftplib and urllib at ftp://xmlsoft.org/libxml2/ where I haven't checked at all; I checked my change only on Windows.
@scoder, Do you mind if I suggest fix by myself? I'm thinking following 3 changes:
If you or someone else wants to take it rather than to leave further changes by me, please feel free to let me know.
I'm getting this error installing lxml (assume that this is related to this PR):