organizing collections of small modules

Eric S. Johansson esj at harvee.org
Sun Mar 25 23:47:56 EDT 2007


Jorge Godoy wrote:
> "Eric S. Johansson" <esj at harvee.org> writes:
> 
>> I have a bunch of small modules that I use within my application.  Most of
>> these modules are single file modules.  Currently, I have them set up as
>> stand-alone modules but because it's a royal pain to fetch five or 10 of these
>> modules for each application and tracking whether or not they are all up to
>> date, I'm considering putting them all into one collection (rcsoc
>> a.k.a. random cross-section of code[1]) so it's easier to load, install, and
>> manage.
>>
>> Are there better techniques for managing collections of modules in 2.4 or
>> later?
>>
>> ---eric
>>
>>
>> [1]  derives from the expression that hamburger is "random cross-section of
>> cow"
> 
> I'm using setuptools for that.  If they're somehow connected --
> e.g. mathematics, database, finance, etc. -- then I create one single package
> for them.  If they aren't, then creating several packages isn't hard.

I already have working setup.py files and the docs indicates that it 
should be a 1 liner to convert from distutils.

> If they are useful enough you can publish them on PyPI and then it is just a
> matter of "easy_install" them.  If they aren't then you'll have to collect
> them somewhere to use easy_install ;-)

I think a couple should be generaly useful (file system based queue, 
union configuration files).  when it all works, I'll publish.

> 
> It also supplies means to determine the minimum / maximum / exact version that
> is required, so this also helps with how up-to-date your library has to be to
> be used with some application.

a big win IMO




More information about the Python-list mailing list