tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

python: testing; and locales



Hi!

Recently I've started trying to run the tests for our python packages.
For some of them it worked nicely (i.e., plain setup.py calls are
fine) but I learned that there at least two other common methods:
py.test and tox.

py.test seems ok so far, just needs a do-test target added.

tox seems a bit more annoying, since it seems to build up a virtualenv
and install all dependencies it thinks it needs from the network.

Does anyone here know enough about tox to suggest how to make this
integrate better with pkgsrc? In particular, at least to just use
installed dependencies and complain about missing stuff instead of
just installing it.

Then I noticed another problems. Python-3.4, probably because of its
supposedly better unicode support, is very anxious to get a proper
locale setting from the environment.

I've seen errors like this (py-lxml):
UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-18:...

where I assume the problem is just that the locale is wrong. Or is
that a bug in the test?

Should we set a locale in the pkgsrc build environment?

qt5-qtwebkit also has something to say about this:

Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'

but perhaps that's just a missing build dependency.

Anyway, help for all of these very welcome :)

Thanks,
 Thomas


Home | Main Index | Thread Index | Old Index