Problem upgrading docutils with setuptools
Hi. Recently I had some troubles with clean update of docutils. 0.3.9 -> 0.4 It looks to me like a setuptools problem. See below: First install docutils 0.3.9: ----------------------- 8< ---------------------------------- D:\download\python\docutils>easy_install docutils-0.3.9.tar.gz Processing docutils-0.3.9.tar.gz Running docutils-0.3.9\setup.py -q bdist_egg --dist-dir c:\docume~1\mast\ustawi~1\temp\easy_install-cxyfp2\docutils-0.3.9\egg-dist-tmp-rcp8-e "optparse" module already present; ignoring extras/optparse.py. "textwrap" module already present; ignoring extras/textwrap.py. zip_safe flag not set; analyzing archive contents... Adding docutils 0.3.9 to easy-install.pth file Installing rst2latex.py script to C:\Python24\Scripts Installing rst2html.py script to C:\Python24\Scripts Installed c:\python24\lib\site-packages\docutils-0.3.9-py2.4.egg Processing dependencies for docutils==0.3.9 D:\download\python\docutils>python -c "import docutils.parsers.rst; print 'OK'" OK ----------------------- 8< ---------------------------------- Then upgrade to docutils 0.4. Note that setup says "roman" module is already there. It was installed as a part of docutils 0.3.9. At the moment when setup checks for module roman - docutils 0.3.9 egg is still on the PYTHONPATH and therefore "roman" is not installed. But later on docutils 0.3.9 egg is removed from PYTHONPATH and docutils 0.4 fails: ----------------------- 8< ---------------------------------- D:\download\python\docutils>easy_install -U docutils-0.4.tar.gz Processing docutils-0.4.tar.gz Running docutils-0.4\setup.py -q bdist_egg --dist-dir c:\docume~1\mast\ustawi~1\ temp\easy_install-hnciga\docutils-0.4\egg-dist-tmp-y4g2fn "optparse" module already present; ignoring extras/optparse.py. "textwrap" module already present; ignoring extras/textwrap.py. "roman" module already present; ignoring extras/roman.py. zip_safe flag not set; analyzing archive contents... docutils.parsers.rst.directives.misc: module references __file__ docutils.writers.html4css1.__init__: module references __file__ docutils.writers.newlatex2e.__init__: module references __file__ docutils.writers.pep_html.__init__: module references __file__ docutils.writers.s5_html.__init__: module references __file__ Removing docutils 0.3.9 from easy-install.pth file Adding docutils 0.4 to easy-install.pth file Installing rst2html.py script to C:\Python24\Scripts Installing rst2latex.py script to C:\Python24\Scripts Installing rst2newlatex.py script to C:\Python24\Scripts Installing rst2pseudoxml.py script to C:\Python24\Scripts Installing rst2s5.py script to C:\Python24\Scripts Installing rst2xml.py script to C:\Python24\Scripts Installed c:\python24\lib\site-packages\docutils-0.4-py2.4.egg Processing dependencies for docutils==0.4 D:\download\python\docutils>python -c "import docutils.parsers.rst; print 'OK'" Traceback (most recent call last): File "<string>", line 1, in ? File "c:\python24\lib\site-packages\docutils-0.4-py2.4.egg\docutils\parsers\rst\__init__.py", line 77, in ? from docutils.parsers.rst import states File "c:\python24\lib\site-packages\docutils-0.4-py2.4.egg\docutils\parsers\rst\states.py", line 110, in ? import roman ImportError: No module named roman ----------------------- 8< ---------------------------------- EasyInstall docs say:
installing a package automatically replaces any previous version in the easy-install.pth file
So maybe this replacing should be done earlier - ensuring that the previous version's code is not in path - before actually running setup ? Or is it a bug in docutils' setup.py ? Cheers, Maciek
participants (1)
-
Maciek Starzyk