Something bugs me about virtualenv, distribute, development, and testing. I figure I'm probably doing something wrong and that y'all will be able to set me straight.
I'm working on a new tool called pkgme[1]. It uses distribute and recommends
using virtualenv for development. After activating the virtualenv you can do
'python setup.py develop' and do convenient in-place editing so that your
changes to the source show up immediately in the running environment. So far
so good.
However, when I want to run the test suite, it does the equivalent of a
'python setup.py build' and then runs the tests out of the
build/lib.{platform}-{version} directory. This actually screws with our tests
because (at least currently) the tests are looking for shell scripts and other
programs that live in our tree, but are not part of the Python packaging, so
don't get built or installed by setup.py. When we do filesystem introspection
to try to find the scripts to exec them, it will work when running in develop
mode, but fail in the tests, since __file__ points into build/lib.* instead of
the source tree.
So I'm wondering if other folks have hit similar problems and what best
practices can be recommended to deal with this problem. I can think of
various hacks around the problem, but don't want to reinvent the wheel.
Or do you think that 'python setup.py test' should use the in-place tree and
this is Just A Bug?
Cheers,
-Barry
[1] https://launchpad.net/pkgme
signature.asc
Description: PGP signature
_______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
