Hash: SHA1

Baiju M wrote:
> Chris McDonough wrote:
>>  Is there an equivalent for "tests_require" in
>>  buildout.cfg/zc.recipe.testrunner?
>>  The reason I ask is this... currently the zope.18n distribution has
>>  an install_requires that looks something like this:
>>  install_requires=[ 'setuptools', 'pytz', 'zope.i18nmessageid',
>>  'zope.component [zcml]', 'zope.configuration', ]
>>  That's actually a no-good pack of lies, though. ;-)  I'd like to
>>  change setup.py to something like this:
>>  test_suite = "__main__.alltests", # to support "setup.py test"
>>  tests_require=[ 'zope.testing', 'pytz', 'zope.component [zcml]',
>>  'zope.configuration', ], install_requires=[ 'setuptools', 'pytz',
>>  'zope.i18nmessageid', 'zope.component', # *we* do not require
>>  zope.configuration at all. Our tests # do (for silly reasons) and the
>>  framework which uses our zcml # does. ],
>>  But I want buildout tests to continue to work.
> -1  for using different methods for running tests.
> Testing packages should be done in same way by all developers.
> If one person run tests in one way and another one in another way is not 
> good.
> IMO, we should have a policy to use Buildout for development of Zope 
> packages.

Chris is not advocating switching away from zc.buildout for the
*development* of the packages;  he is arguing that we can't force people
who *use* the packages to stop using the facilities supplied setuptools.

If we want people outside the rather small group of core Zope developers
to *use* our software, we are going to need to accomodate their
expectations about how Python pacakges work.  At a miniumum, any package
which we release to the Cheeseshop should be testable and installable
using the "standard" tool used by nearly everyone:  setuptools.

That means we need to work harder at a coule of things:

 - Making sure the install-time dependencies in setup.py are accurate,
   minimal, and themselves installable.

    $ wget http://download.zope.org/zope.tal-3.4.0.tar.gz
    $ tar xzf zope.tal-3.4.0.tar.gz
    $ cd zope.tal-3.4.0
    $ /path/to/python setup.py install

   If that fails for *any* package listed on the cheeseshop, then
   we lose:  people won't use it, and they won't bother looking at
   other packages we release, either.

 - Making sure that the tests can psss for somebody who is not a
   core Zope developer, (and therefore who doesn't know about
   zc.buildout, or want to).  E.g.:

    $ /path/to/python setup.py develop
    $ /path/to/python setup.py test

   If there are dependencies which are needed to run the tests but
   not merely to install the package, there should be a way to
   spell that.  In setuptools, that is what 'tests_require' is
   for;  buildout doesn't (yet) have such a spelling (I think).

In order to succeed here, we are going to have to quit releasing
packages without more careful thought, testing, etc.

- --
Tres Seaver          +1 540-429-0999          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to