[Lxml-checkins] r52105 - in lxml/trunk: . doc
scoder at codespeak.net
scoder at codespeak.net
Mon Mar 3 19:41:43 CET 2008
Author: scoder
Date: Mon Mar 3 19:41:43 2008
New Revision: 52105
Modified:
lxml/trunk/ (props changed)
lxml/trunk/INSTALL.txt
lxml/trunk/doc/main.txt
lxml/trunk/doc/mkhtml.py
Log:
r3696 at delle: sbehnel | 2008-03-03 10:17:04 +0100
doc cleanup and fixes
Modified: lxml/trunk/INSTALL.txt
==============================================================================
--- lxml/trunk/INSTALL.txt (original)
+++ lxml/trunk/INSTALL.txt Mon Mar 3 19:41:43 2008
@@ -40,12 +40,12 @@
Building lxml from sources
--------------------------
-If you want to build lxml from SVN you should read `how to build lxml from
-source`_ (or the file ``build.txt`` in the ``doc`` directory of the source
-tree). Building from Subversion sources or from modified distribution sources
-requires Cython_ to translate the lxml sources into C code. The source
-distribution ships with pre-generated C source files, so you do not need
-Cython installed to build from release sources.
+If you want to build lxml from SVN you should read `how to build lxml
+from source`_ (or the file ``doc/build.txt`` in the source tree).
+Building from Subversion sources or from modified distribution sources
+requires Cython_ to translate the lxml sources into C code. The
+source distribution ships with pre-generated C source files, so you do
+not need Cython installed to build from release sources.
.. _Cython: http://www.cython.org
.. _`how to build lxml from source`: build.html
@@ -60,10 +60,10 @@
MS Windows
----------
-For MS Windows, the `binary egg distribution of lxml`_ is statically built
-against the libraries, i.e. it already includes them. There is no need to
-install the external libraries if you use an official lxml build from
-cheeseshop.
+For MS Windows, the `binary egg distribution of lxml`_ is statically
+built against the libraries, i.e. it already includes them. There is
+no need to install the external libraries if you use an official lxml
+build from PyPI.
If you want to upgrade the libraries and/or compile lxml from sources, you
should install a `binary distribution`_ of libxml2 and libxslt. You need both
@@ -76,13 +76,17 @@
MacOS-X
-------
-On MacOS-X 10.4, you can try to use the installed system libraries when you
-build lxml yourself. However, the library versions on this system are older
-than the required versions, so you may encounter certain differences in
-behaviour or even crashes. A number of users reported success with updated
-libraries (e.g. using fink_), but needed to set the environment variable
+The system libraries of libxml2 and libxslt installed under MacOS-X
+tend to be rather outdated. In any case, they are older than the
+required versions for lxml 2.x, so you will have a hard time getting
+lxml to work without installing newer libraries.
+
+A number of users reported success with updated libraries (e.g. using
+fink_ or macports), but needed to set the runtime environment variable
``DYLD_LIBRARY_PATH`` to the directory where fink keeps the libraries.
+See the `FAQ entry on MacOS-X`_ for more information.
.. _fink: http://finkproject.org/
+.. _`FAQ entry on MacOS-X`: FAQ.html#my-application-crashes-on-macos-x
-A MacPort of lxml is available. Try ``port install py25-lxml``.
+A macport of lxml is available. Try ``port install py25-lxml``.
Modified: lxml/trunk/doc/main.txt
==============================================================================
--- lxml/trunk/doc/main.txt (original)
+++ lxml/trunk/doc/main.txt Mon Mar 3 19:41:43 2008
@@ -140,19 +140,17 @@
The source distribution is signed with `this key`_. Binary builds for
MS Windows usually become available through PyPI a few days after a
source release. If you can't wait, consider trying a less recent
-version first.
-
-.. _`lxml at the Python Package Index`: http://pypi.python.org/pypi/lxml/
-.. _`this key`: pubkey.asc
+release version first.
The latest version is `lxml 2.0.2`_, released 2008-02-22
(`changes for 2.0.2`_). `Older versions`_ are listed below.
-.. _`Older versions`: #old-versions
-
Please take a look at the `installation instructions`_!
-.. _`installation instructions`: installation.html
+This complete web site (including the generated API documentation) is
+part of the source distribution, so if you want to download the
+documentation for offline use, take the source archive and copy the
+``doc/html`` directory out of the source tree.
It's also possible to check out the latest development version of lxml
from svn directly, using a command like this::
@@ -166,6 +164,10 @@
fixed or a feature you want has been implemented in the latest trunk
version.
+.. _`lxml at the Python Package Index`: http://pypi.python.org/pypi/lxml/
+.. _`this key`: pubkey.asc
+.. _`Older versions`: #old-versions
+.. _`installation instructions`: installation.html
.. _`how to build lxml from source`: build.html
.. _`Subversion repository`: http://codespeak.net/svn/lxml/
.. _`Subversion history`: https://codespeak.net/viewvc/lxml/
Modified: lxml/trunk/doc/mkhtml.py
==============================================================================
--- lxml/trunk/doc/mkhtml.py (original)
+++ lxml/trunk/doc/mkhtml.py Mon Mar 3 19:41:43 2008
@@ -3,8 +3,8 @@
import os, shutil, re, sys, copy, time
SITE_STRUCTURE = [
- ('lxml', ('main.txt', 'intro.txt', 'lxml2.txt', 'FAQ.txt',
- 'compatibility.txt', 'performance.txt')),
+ ('lxml', ('main.txt', 'intro.txt', '../INSTALL.txt', 'lxml2.txt',
+ 'FAQ.txt', 'compatibility.txt', 'performance.txt')),
('Developing with lxml', ('tutorial.txt', '@API reference',
'api.txt', 'parsing.txt',
'validation.txt', 'xpathxslt.txt',
@@ -12,7 +12,8 @@
'cssselect.txt', 'elementsoup.txt')),
('Extending lxml', ('resolvers.txt', 'extensions.txt',
'element_classes.txt', 'sax.txt', 'capi.txt')),
- ('Developing lxml', ('build.txt', 'lxml-source-howto.txt')),
+ ('Developing lxml', ('build.txt', 'lxml-source-howto.txt',
+ '@Release Changelog')),
]
RST2HTML_OPTIONS = " ".join([
@@ -26,6 +27,11 @@
"API reference" : "api/index.html"
}
+BASENAME_MAP = {
+ 'main' : 'index',
+ 'INSTALL' : 'installation',
+}
+
htmlnsmap = {"h" : "http://www.w3.org/1999/xhtml"}
find_title = XPath("/h:html/h:head/h:title/text()", namespaces=htmlnsmap)
@@ -51,7 +57,7 @@
if page_title:
page_title = page_title[0]
else:
- page_title = replace_invalid(' ', basename.capitalize())
+ page_title = replace_invalid('', basename.capitalize())
build_menu_entry(page_title, basename+".html", section_head,
headings=find_headings(tree))
@@ -78,7 +84,7 @@
tag = el.tag
if tag[0] != '{':
el.tag = "{http://www.w3.org/1999/xhtml}" + tag
- current_menu = find_menu(menu_root, name=name)
+ current_menu = find_menu(menu_root, name=replace_invalid('', name))
if current_menu:
for submenu in current_menu:
submenu.set("class", submenu.get("class", "").
@@ -102,6 +108,10 @@
shutil.copy(pubkey, dirname)
+ href_map = HREF_MAP.copy()
+ changelog_basename = 'changes-%s' % release
+ href_map['Release Changelog'] = changelog_basename + '.html'
+
trees = {}
menu = Element("div", {"class":"sidemenu"})
# build HTML pages and parse them back
@@ -111,13 +121,12 @@
if filename.startswith('@'):
# special menu entry
page_title = filename[1:]
- url = HREF_MAP[page_title]
+ url = href_map[page_title]
build_menu_entry(page_title, url, section_head)
else:
path = os.path.join(doc_dir, filename)
- basename = os.path.splitext(filename)[0]
- if basename == 'main':
- basename = 'index'
+ basename = os.path.splitext(os.path.basename(filename))[0]
+ basename = BASENAME_MAP.get(basename, basename)
outname = basename + '.html'
outpath = os.path.join(dirname, outname)
@@ -128,20 +137,16 @@
build_menu(tree, basename, section_head)
- # integrate menu
- for tree, basename, outpath in trees.itervalues():
- new_tree = merge_menu(tree, menu, basename)
- new_tree.write(outpath)
-
# also convert INSTALL.txt and CHANGES.txt
rest2html(script,
- os.path.join(lxml_path, 'INSTALL.txt'),
- os.path.join(dirname, 'installation.html'),
- stylesheet_url)
- rest2html(script,
os.path.join(lxml_path, 'CHANGES.txt'),
os.path.join(dirname, 'changes-%s.html' % release),
stylesheet_url)
+ # integrate menu
+ for tree, basename, outpath in trees.itervalues():
+ new_tree = merge_menu(tree, menu, basename)
+ new_tree.write(outpath)
+
if __name__ == '__main__':
publish(sys.argv[1], sys.argv[2], sys.argv[3])
More information about the lxml-checkins
mailing list