mhils / libxml2-win-binaries Goto Github PK
View Code? Open in Web Editor NEWlibxml2 Windows binaries for lxml
libxml2 Windows binaries for lxml
Great job, thanks.
I want to build python binding for xmlsec for both python2.x and python3.x
Could you please also add xmlsec and openssl binaries too ?
xmlsec source code: https://github.com/lsh123/xmlsec/tree/master/win32
openssl source code: https://github.com/winlibs/openssl
And also publish both binaries: which are built with vs2008 and vs2015
I just tried to run py -3.7 setup.py bdist_wheel --static-deps
on Windows 10 machine running the latest python 3.7.0 and I got an error saying that
The object or library file 'libs\iconv-1.14.win64\lib\iconv_a.lib' was created with an older compiler than other objects; rebuild old objects and libraries
I noticed that the buildlibxml.py
script included in the lxml repository downloads the precompiled binaries to include in the lxml windows wheels for python3.5 and 3.6 from this github repository.
So I guess the next step in order to have lxml python3.7 wheels for Windows is to update this to make available static libraries of libxml2, libxslt, zlib and iconv that are compiled with the latest Visual Studio 2017.
According to
https://mail.gnome.org/archives/xml/2017-August/msg00003.html
a new libxml2 release is coming up soon, which will hopefully solve some issues with the latest two releases. I'd like to include it in the binaries for the next lxml release, so would be good to quickly get the libraries built when they are out.
I'm not sure exactly what's going on, but it seems the gzip compression inside libxml2 is not working with these libraries.
I observed this in the lxml unit tests, ones that use string or HTTP with compression support:
test.py lxml.tests.test_etree ETreeC14NTestCase.test_c14n_file_gzip
test.py lxml.tests.test_etree ETreeWriteTestCase.test_write_file_gzip
test.py lxml.tests.test_etree ETreeWriteTestCase.test_write_file_gzipfiletest_parse
test.py lxml.tests.test_http_io HttpIOTestCase.test_http_client_gzip
The other gzip tests do the compression work in the lxml code, rather than using libxml2's compression support.
I created a minimal reproduction case:
#!/usr/bin/env python
from lxml import etree
from io import StringIO
etree.parse(StringIO(u'<a><b/></a>')).write_c14n('test1.xml', compression=9)
On Python 2.7.12 x64 using lxml 3.6.0 (latest Python 2.7 wheel available on pypi), the created file is gzip-compressed: Success
On Python 3.5.2 x64 using lxml 3.7.2 or 3.7.1 (only Python 3.5 wheels available on pypi), the created file in uncompressed: Failure
I've also confirmed this behaviour in a local build of unmodified lxml trunk.
The build scripts for libxml2-win-binaries do not currently enable zlib support in the libxml2 or libxslt2 libraries. I was attempting to fix this in a branch (See TBBle/libxml2-win-binaries@43eff97, the rest of that branch is pending in #5). Building lxml against the AppVeyor builds of that branch didn't cause the tests to pass, so I'm not sure if something else is wrong still with that branch, or if the problem is elsewhere.
A notable difference is that if you remove the zlib downloading and linking from the setupinfo.py and buildlibxml.py in lxml, the build against latest-release libs in libxml2-win-binaries still works, but against my own branched libraries fail to link due to missing zlib symbols. So my branch changes have had some effect, but not resolved the issue.
So at this point, I'm trying to work out why even my builds (which clearly do reference zlib) do not seem to compress when passed the compression parameter. The next step might be to build some of the libxml2 tools in the same build-pass, and see if they work with compressed data.
The other libs are probably still fine.
Note that libxml2 2.9.11/12 are non-functional with lxml. 2.9.13 should be ok, once it's released.
Thanks!
PackageManagement\Install-Package : A command with name 'gcb' is already available on this system. This module 'Pscx' may override the existing commands. If you still want to install this module 'Pscx', use -AllowClobber
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.