[Zope-Coders] Proposed 2.7 features

David Goodger goodger@python.org
Thu, 23 Jan 2003 14:28:58 -0500


Andreas Jung wrote:
> The docutils package in my private branch currently lives under
> lib/python/docutils. This might gives some conflicts with a docutils package
> installation outside Zope.

Docutils is normally installed by Distutils into site-packages, which is the
last entry on sys.path.  A copy directly installed in Python's lib should be
found before one in {lib}/site-packages.

> Since I added a customized writer for the reST
> integration there is some risk that the reST integration might breeak.

Why?  Because of another copy being found on import?  If so, the above
should put that worry to rest.  If the user has a copy installed somewhere
else in conjunction with a custom PYTHONPATH envar, isn't that their
problem?

> @David: would it be safe to move the package to
> lib/python/restructuredtext/docutils to enfore the use of this package or is
> there a better and cleaner solution?

I'm not sure I understand what you mean, but if I do ;), I wouldn't
recommend that approach.  Within Docutils most imports are of the form "from
docutils import x" or "from docutils.x import y": "docutils" had better be
directly importable.  If it isn't, there's a lot of code to be fiddled.

-- David Goodger    http://starship.python.net/~goodger

Programmer/sysadmin for hire: http://starship.python.net/~goodger/cv