summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2014-04-04 07:10:23 +0200
committerStefan Behnel <stefan_ml@behnel.de>2014-04-04 07:10:23 +0200
commit0641fb949f72d4546a6c4cce5e2aa06511b9c0fc (patch)
tree10ebb020459b0d62e3f6f744a1cbcfe8983da863
parent721ccc0dc0d297aedf8001c94952d1b777d69b1e (diff)
downloadpython-lxml-0641fb949f72d4546a6c4cce5e2aa06511b9c0fc.tar.gz
update MSWindows build docs
--HG-- extra : transplant_source : %CCZ%F0%A0%3AC3%F7I%F7AXE%AE%E1%05-%24%D0K
-rw-r--r--INSTALL.txt28
-rw-r--r--doc/build.txt73
2 files changed, 20 insertions, 81 deletions
diff --git a/INSTALL.txt b/INSTALL.txt
index 0b4eb424..2ac9e630 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -149,11 +149,13 @@ others pay for it.
Due to the additional lack of package management of this platform,
it is best to link the library dependencies statically if you decide
-to build from sources. For that, use the `binary distribution of
-libxml2 and libxslt <http://www.zlatkovic.com/libxml.en.html>`_.
-You need both libxml2 and libxslt, as well as iconv and zlib,
-which you can get from the same download site. Further build
-instructions are in the `source build documentation <build.html>`_.
+to build from sources, rather than using a binary installer. For
+that, lxml can use the `binary distribution of libxml2 and libxslt
+<http://www.zlatkovic.com/libxml.en.html>`_, which it downloads
+automatically during the static build. It needs both libxml2 and
+libxslt, as well as iconv and zlib, which are available from the
+same download site. Further build instructions are in the
+`source build documentation <build.html>`_.
MacOS-X
@@ -163,20 +165,12 @@ A `macport <http://macports.org/>`_ of lxml is available. Try
something like ``port install py25-lxml``.
If you want to use a more recent lxml release, you may have to build
-it yourself. Apple doesn't help here, as MacOS-X is so badly maintained
-by them that the pre-installed system libraries of libxml2 and libxslt
-tend to be horribly outdated, and updating them is everything but easy.
-In any case, you cannot run lxml with the system provided libraries,
-so you have to use newer libraries.
+it yourself. While the pre-installed system libraries of libxml2
+and libxslt are less outdated in recent MacOS-X versions than they
+used to be, so lxml should work them them out of the box, it is still
+recommended to use a static build with the most recent versions.
Luckily, lxml's ``setup.py`` script has built-in support for building
and integrating these libraries statically during the build. Please
read the
`MacOS-X build instructions <build.html#building-lxml-on-macos-x>`_.
-
-A number of users also reported success with updated libraries (e.g.
-using `fink <http://finkproject.org/>`_ or macports), but needed to set
-the runtime environment variable ``DYLD_LIBRARY_PATH`` to the directory
-where fink keeps the libraries. In any case, this method is easy to get
-wrong and everything but safe. Unless you know what you are doing,
-follow the static build instructions above.
diff --git a/doc/build.txt b/doc/build.txt
index 074b532f..0c2ef8ce 100644
--- a/doc/build.txt
+++ b/doc/build.txt
@@ -280,70 +280,15 @@ Static linking on Windows
Most operating systems have proper package management that makes installing
current versions of libxml2 and libxslt easy. The most famous exception is
-Microsoft Windows, which entirely lacks these capabilities. It can therefore
-be interesting to statically link the external libraries into lxml.etree to
-avoid having to install them separately.
-
-Download lxml and all required libraries to the same directory. The iconv,
-libxml2, libxslt, and zlib libraries are all available from the ftp site
-ftp://ftp.zlatkovic.com/pub/libxml/.
-
-Your directory should now have the following files in it (although most likely
-different versions)::
-
- iconv-1.9.1.win32.zip
- libxml2-2.6.23.win32.zip
- libxslt-1.1.15.win32.zip
- lxml-1.0.0.tgz
- zlib-1.2.3.win32.zip
-
-Now extract each of those files in the *same* directory. This should give you
-something like this::
-
- iconv-1.9.1.win32/
- iconv-1.9.1.win32.zip
- libxml2-2.6.23.win32/
- libxml2-2.6.23.win32.zip
- libxslt-1.1.15.win32/
- libxslt-1.1.15.win32.zip
- lxml-1.0.0/
- lxml-1.0.0.tgz
- zlib-1.2.3.win32/
- zlib-1.2.3.win32.zip
-
-Go to the lxml directory and edit the file ``setup.py``. There should
-be a section near the top that looks like this::
-
- STATIC_INCLUDE_DIRS = []
- STATIC_LIBRARY_DIRS = []
- STATIC_CFLAGS = []
-
-Change this section to something like this, but take care to use the correct
-version numbers::
-
- STATIC_INCLUDE_DIRS = [
- "..\\libxml2-2.6.23.win32\\include",
- "..\\libxslt-1.1.15.win32\\include",
- "..\\zlib-1.2.3.win32\\include",
- "..\\iconv-1.9.1.win32\\include"
- ]
-
- STATIC_LIBRARY_DIRS = [
- "..\\libxml2-2.6.23.win32\\lib",
- "..\\libxslt-1.1.15.win32\\lib",
- "..\\zlib-1.2.3.win32\\lib",
- "..\\iconv-1.9.1.win32\\lib"
- ]
-
- STATIC_CFLAGS = []
-
-Add any CFLAGS you might consider useful to the third list. Now you
-should be able to pass the ``--static`` option to setup.py and
-everything should work well. Try calling::
-
- python setup.py bdist_wininst --static
-
-This will create a windows installer in the ``pkg`` directory.
+Microsoft Windows, which entirely lacks these capabilities. To work around
+the limits of this platform, lxml's installation can download pre-built
+packages of the dependencies and build statically against them. Assuming
+you have a proper C compiler setup to build Python extensions, this should
+work::
+
+ python setup.py bdist_wininst --static-deps
+
+It should create a windows installer in the ``pkg`` directory.
Building Debian packages from SVN sources