[Zope-dev] Re: Why third_party/docutils?

Tres Seaver tseaver at zope.com
Fri Dec 17 12:05:49 EST 2004


Andreas Jung wrote:
> 
> 
> --On Freitag, 17. Dezember 2004 11:34 Uhr -0500 Tres Seaver 
> <tseaver at zope.com> wrote:
> 
>> Andreas Jung wrote:
>>
>> I don't get this.  Why couldn't we just delete the *entire* stripped-down
>> 'docutils' package and replace it with the *whole* package *in exactly
>> the same location*?  E.g. (assuming we had not already munged things):
>>
>>    $ cd Zope-2.7-branch/lib/python/docutils
>>    $ find . -type "f" | grep -v CVS | xargs cvs rm -f
>>    $ cvs commit -m " - Blow away stripped down docutils."
>>    $ tar xzf /tmp/docutils-the-whole-enchilada.tar.gz
>>    $ find . -type "f" | grep -v CVS | xargs cvs add
>>    $ cvs commit -m " - Add current docutils."
> 
> 
> If you unpack Docutils as a whole in lib/python then you will a structure
> 
>   lib/python/docutils/docutils
>                                        ^^^^^^
>                                         This is the directed where 
> docutils import usually start.
> 
> If you do adjust sys.path to lib/python/docutils/docutils then every code
> that tries to import the docutils package will fail because it tries to 
> import
> from lib/python/docutils instead from lib/python/docutils/docutils. I don't
> know why this is so hard to understand or are we talking about different 
> things?

OK, then suppose we vendor import the docutils tarball into a different 
location, e.g.:

   $ cd /tmp
   $ tar xzf docutils-the-whole-enchilada.tar.gz
   $ cd dodcutils
   $ cvs -d :ext:cvs.zope.org:/cvs-repository import \
     Libraries/docutils docutils docutils-0_xxx

and then symlink the actual package portion in the CVS repository into
Zope/lib/python?

For SVN, we would spell that somewhat differently, but the idea would be 
the same.  The major goal is to remove the need to jigger either the 
Python search path or the sitecustmize.py package;  both of those 
practices step on territory which is intended to belong to the system 
admin, rather than the software.


Tres.
-- 
===============================================================
Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com



More information about the Zope-Dev mailing list