Re: [Distutils] custom egg metadata

2007-01-08 Thread Phillip J. Eby
At 03:11 PM 1/8/2007 +0100, Lutz Pälike wrote:
   There appears no definition of xyz_settings.txt ?
   Am i missing something here ?

Your custom writer has to be on sys.path in order to work, but your 
package_dir isn't on sys.path.

You'll have to either install the writer as a separate egg and use 
setup_requires to ensure it gets on the path, or else move your package_dir 
to the setup.py directory.

The general intention of the design, however, was for egg_info writers to 
live in a different egg than the one being built, and to be activated using 
setup_requires.

Still, you *can* make it work, it's just that you'll have to run the 
egg_info command (or a command that runs egg_info) more than once in order 
to get your custom metadata written, because the first time the egg_info is 
written, your entry points won't be on disk yet.  The second time, it will.

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] RFC: Standard Declaration of tests in eggs

2007-01-08 Thread Phillip J. Eby
At 06:05 PM 1/8/2007 +, John J Lee wrote:
On Mon, 8 Jan 2007, David Fraser wrote:
[...]
  So I need to go and code a test enumerator for py.test to discover tests
  within eggs (which is possible)
[...]

Or (for new code) use nose, which AIUI is intended to be pretty much
py.test implemented within the unittest framework (plus whatever bits and
pieces the nose authors wanted to change, it's true).

I'm not sure whether nose handles test discovery in eggs, but I believe 
that, like py.test, it has pluggable enumeration capabilities.

What would be nice is if we could get some folks working on py.test and 
nose to chime in on the proposal, to make sure that it's sound.  At the 
moment, the proposal (or at least my suggested version of it) allows for:

* specification of one loader for all tests in an egg

* specification of zero or more entry points for locating tests

The only way to provide any configuration to the loader is via attributes 
of the entry points.  For example, if the entry point is a module, you 
could set your options location via attributes of the module.

The loader must support a .loadTestFromName(name, obj) call, where name 
will be an empty string, and obj will be the object specified by a test 
entry point.  The return value must be a unittest.TestSuite.  And it must 
be possible to call the loader multiple times with different 'obj' values.

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig