[Numpy-discussion] numpydoc for python 3?

Matthew Brett matthew.brett@gmail....
Sun Jan 13 16:53:12 CST 2013


Hi,

On Sun, Jan 13, 2013 at 10:46 PM, Jaakko Luttinen
<jaakko.luttinen@aalto.fi> wrote:
> On 2013-01-10 17:16, Jaakko Luttinen wrote:
>> On 01/10/2013 05:04 PM, Pauli Virtanen wrote:
>>> Jaakko Luttinen <jaakko.luttinen <at> aalto.fi> writes:
>>>> The files in numpy/doc/sphinxext/ and numpydoc/ (from PyPI) are a bit
>>>> different. Which ones should be modified?
>>>
>>> The stuff in sphinxext/ is the development version of the package on
>>> PyPi, so the changes should be made in sphinxext/
>>>
>>
>> Thanks!
>>
>> I'm trying to run the tests with Python 2 using nosetests, but I get
>> some errors http://pastebin.com/Mp9i8T2f . Am I doing something wrong?
>> How should I run the tests?
>> If I run nosetests on the numpydoc folder from PyPI, all the tests are
>> successful.
>
> I'm a bit stuck trying to make numpydoc Python 3 compatible. I made
> setup.py try to use distutils.command.build_py.build_py_2to3 in order to
> transform installed code automatically to Python 3. However, the tests
> (in tests folder) are not part of the package but rather package_data,
> so they won't get transformed. How can I automatically transform the
> tests too? Probably there is some easy and "right" solution to this, but
> I haven't been able to figure out a nice and simple solution.. Any
> ideas? Thanks.

Can you add tests as a package 'numpydoc.tests' and add an __init__.py
file to the 'tests' directory?

You might be able to get away without 2to3, using the kind of stuff
that Pauli has used for scipy recently:

https://github.com/scipy/scipy/pull/397

I'm happy to help over email or chat, just let me know.

Best,

Matthew


More information about the NumPy-Discussion mailing list