[TIP] [Distutils] RFC: Barely minimal CI + tests + packaging in Python WAS: Guidelines for where to put tests & how to package them
olemis at gmail.com
Mon Mar 1 11:53:24 PST 2010
On Mon, Mar 1, 2010 at 2:47 PM, Olemis Lang <olemis at gmail.com> wrote:
> On Mon, Mar 1, 2010 at 2:22 PM, Chris Withers <chris at simplistix.co.uk> wrote:
>> P.J. Eby wrote:
>>> At 10:41 AM 2/25/2010 -0500, Olemis Lang wrote:
>>>> PS: BTW, how could I trigger easy_install(ation) at a given point
>>>> while implementing a distutils command, and let the command perform
>>>> further actions if deps are installed correctly ?
>>> Setuptools' "Distribution" object has a method for fetching dependencies.
>>> See setuptools' "test" command for an example. (This doesn't install the
>>> dependencies globally, just drops eggs into the build directory. But
>>> they're there and available to be reused for installation in a later phase,
>>> under normal circumstances.)
>> ...which is all pretty grim. If you use this with other packaging tools,
>> like, say, buildout, the testing dependencies just get dumped into your
>> buildout, which is a bit yucky to put it mildly.
>> How about putting them where other eggs get put but only making them
>> available for the tests?
> something like develop ?
>> Failing that, how about putting them somewhere temporary?
> I am not sure but I think there's an option to specify the build
> directory (CMIIW). AFAIK (not tested ;o) what happens is that build
> command is executed so I suppose that if options are specified for
> this command then it should be parse, accept and use the target dir,
> isn't it ?
> $ python setup.py --help build
> Common commands: (see '--help-commands' for more)
> Global options:
> Options for 'build' command:
> --build-temp (-t) temporary build directory
> PS: just a comment, but I'd really wanna know if I'm wrong because I
> wanted to try something similar @ testrun.org in order to perform
> concurrent builds ;o)
I'll be using this plus `virtualenv` (already setup @ testrun.org) in
order to install test dependencies to an isolated (clean ?) Py
Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/
More information about the testing-in-python