[Distutils] programmatically adding entry points

Antoine Pitrou antoine.pitrou at wengo.com
Tue Apr 24 18:50:15 CEST 2007


Le mardi 24 avril 2007 à 12:45 -0400, Phillip J. Eby a écrit :
> At 05:27 PM 4/24/2007 +0200, Antoine Pitrou wrote:
> >I've read the pkg_resources API (*) and I don't see any way of
> >programmatically registering a (possibly temporary) entry-point. The
> >only documented way to add entry points is to write setup scripts.
> >But if I want to write unit tests for entry point-related behaviour, I
> >don't want to run setup scripts in my unit tests. Is there a simple way
> >to do this?
> 
> Write your code to separate the finding of entry points, from the 
> *processing* of entry points.  Then pass in manually-created EntryPoint 
> instances to test the processing routines.

Well, it makes sense. Thanks :-)


Antoine.




More information about the Distutils-SIG mailing list