[Zope-dev] Re: buildout "tests_require" analogue

Tres Seaver tseaver at palladion.com
Thu Nov 15 11:31:58 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Fulton wrote:
> On Nov 15, 2007, at 10:52 AM, Tres Seaver wrote:
> ...
>>> Grrrrr. I find "setup.py test" to be really annoying as it requires
>>> meta data that is available only to that command.
>> Not after running 'egg_info', or any other setuptools-aware command;
>> the tests_require dependencies then become introspectable.  E.g.:
>>
>>  $ svn co $ZSVN/zope.tal/trunk zope.tal-trunk
>>  $ cd zope.tal-trunk
>>  $ /path/to/setuptools-aware/python setup.py egg_info
>>  $ cat src/zope.tal-egg-info/requires.txt
>>  setuptools
>>  zope.i18nmessageid
>>  zope.interface
>>
>>  [test]
>>  zope.testing
> 
> 
> None of these is tests_require.  The above lists the contents of  
> install_requires and the test extra.  zope.tal is odd because it  
> lists the same values in tests_require and install requires.  Try  
> putting something else in tests_require and see if you see it show up.
> 
> I know that the contents of tests_require isn't saved because I  
> *tried* to get buildout to use it and asked about it on the distutils  
> sig:
> 
>    http://mail.python.org/pipermail/distutils-sig/2007-January/007083.html
> 
> Of course, something could have changed since then, but I doubt it.

Nope.

>>> Ideally, buildout (really the testrunner recipe) should be able to
>>> honor tests_require, but setuptools doesn't make this information
>>> available to any other packages. :( (big frowny)  Also, I believe
>>> that more is required to get "setup.py test" to work.  I'm unsure
>>> what the details are.
>> See above.  If buildout can trigger creation of the egg-info  
>> directory,
>> all should be well.  In fact, that directory will already be  
>> present in
>> any source distribution built with setuptools.
> 
> Again, I believe you are mistaken.

You are correct:  I was misled by the presence of the section for the
'tests' extra.  Attached find a patch against the setuptools-0.6 branch
which addes a 'tests_require.txt' file entry point.  I will propose that
the patch be included over on the distutils list.



Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHPHR++gerLs4ltQ4RAnVTAKC7KSP2UTNjQt8aCVwDeBW80Zu0UgCfT+/T
DBdr4PuHBOBmBHP4Gte2R8U=
=2M92
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setuptools-add_tests_require_file.patch
Type: text/x-patch
Size: 2715 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20071115/fedb9a9f/setuptools-add_tests_require_file.bin


More information about the Zope-Dev mailing list