[Distutils] RFC: Barely minimal CI + tests + packaging in Python WAS: Guidelines for where to put tests & how to package them

P.J. Eby pje at telecommunity.com
Thu Feb 25 18:29:33 CET 2010


At 12:10 PM 2/25/2010 -0500, Olemis Lang wrote:
>Thnx for your reply !
>
>On Thu, Feb 25, 2010 at 12:00 PM, P.J. Eby <pje at telecommunity.com> 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.)
> >
>
>So this means that setuptools `test` command already retrieves dependencies ?

Yes - it also retrieves any testing-specific dependencies (per the 
"tests_require" setup() argument), so that if you use another testing 
library like py.test or nose, it can be used instead.


>If so, then I shouldn't care about that, because I'd only need to
>override `run_tests` method in order to do what I want to do (i.e. use
>another test runner ;o)

In that case, you may want to simply use the setuptools trunk version 
(setuptools==dev), which supports a test_runner setup() argument to 
the test command.  ;-)



More information about the Distutils-SIG mailing list