On Friday, October 4, 2013, Mike Orr wrote:

> Is it better to put a 'tests' directory at the top level of a Python
> distribution, or as a subpackage of the package being tested?


I prefer to put tests outside of the package--it seems to me that they
shouldn't be part of the installed package. But as you say, it's a matter
of taste. Some folks like to be able to install a package, and then run
tests from anywhere. Another factor is how folks install packages. If users
install a package with pip, they don't (easily) have the full source
distro. If you want those folks to be able to run the tests, then they
should be in the package.



> And for
> documentation directories (Sphinx)?


Those I'd leave out of the package, but again, probably taste.




> Is anyone using the wheel distribution format yet (bist_wheel)?


I haven't seen much (any)use yet ... But we need to start--we still need to
get the kinks worked out, and that won't happen if no one uses it.




> Does it scale between generic pure Python distributions (that
> would like one distribution file for all platforms and several Python
> versions) and platform-specific/version-specific distributions?


Yes, it does. A Wheel is just a zip of what would get Installed in
site-packages, so if a package is pure-python, single source, it should
work anywhere the code works.

There is a meta-data and naming standard that supports specifying what
versions, platforms, etc are supported.

Of course, packages with compiled extensions will need to build a wheel for
each platform.

See: http://www.python.org/dev/peps/pep-0427/

For the details.

-Chris


-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython

Reply via email to