On 2012-05-15, David Goodger wrote:
> On Mon, May 14, 2012 at 8:58 AM, Todd <toddrme2178@...> wrote:
>> When compiling docutils 9 for python 3 I get
>> directories that are not present in the python 2 version.
>> These are:
>> Are these directories supposed to be here?
> They should not be in the site-packages directory.
> Indeed, that is a bug.
> The contents of the tools subdirectory (at least the rst2*.py files)
> should be installed in the appropriate bin/ directory.
> The test directory should not be installed at all IMO. It isn't
> installed under Python 2.x. While it may need to be converted with
> 2to3.py for Python 3.x, I think that should be a separate step from
> package installation.
The conversion is part of ``setup.py build`` which I think is correct.
However, they should not be installed but kept in the "build" directory.
I have prepared a patch for setup.py which hopefully solves this:
Exec: svn 'diff' 'setup.py' 2>&1
--- setup.py (Revision 7421)
+++ setup.py (Arbeitskopie)
@@ -32,7 +32,7 @@
'tools/' and 'test/' dirs and run 2to3 on *.py files.
manifest_in = """\
- exclude *.pyc *~ .DS_Store
+ exclude *.pyc *~ .DS_Store rst2*.py rstpep2html.py
recursive-exclude * *.pyc *~ .DS_Store
recursive-exclude functional/output *
@@ -48,7 +48,7 @@
print("copying aux dirs")
loglevel = log.set_threshold(log.ERROR)
for source in ['tools', 'test']:
- dest = os.path.join(self.build_lib, source)
+ dest = source + '3'
copydir_run_2to3(source, dest, template=self.manifest_in)
@@ -187,6 +187,7 @@
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: OS Independent',
'Programming Language :: Python',
+ 'Programming Language :: Python :: 3',
'Topic :: Documentation',
'Topic :: Software Development :: Documentation',
'Topic :: Text Processing',
This places the converted utility files in build/tools3 and
Test run fine, with one exception: the relative path to the default CSS file
differs from the expected value:
-<link rel="stylesheet" href="../../../docutils/writers/html4css1/html4css1.css" type="text/css" />
+<link rel="stylesheet" href="../../../lib/docutils/writers/html4css1/html4css1.css" type="text/css" />
which leads to 14 failures (as this happens in many tests).
Maybe we should place a copy of html4css1.css in the test data?
> An idea for whoever implements a fix: perhaps we could
> include a Makefile with a "make tests" clause for this (as well as
> "make install" and anything else that makes sense).
I'll leave this to whoever feels inclined. (I'd prefer "targets" for the
Python setuptools over `make`, though.)