On Sun, Apr 17, 2011 at 12:14 AM, Tal Einat <[email protected]> wrote:
> On Sat, Apr 16, 2011 at 4:52 PM, cool-RR <[email protected]> wrote: > >> On Sat, Apr 16, 2011 at 3:50 PM, Tal Einat <[email protected]> wrote: >> >>> >>> Then perhaps have them write the metadata in a metadata.py file, and >>> execfile it in __init__.py? Then you can just execfile the metadata.py file >>> if you want just the metadata. >>> >> >> That would solve the distutils problem, but now the main problem of DRY. >> Also, I'd hate to force people to do these procedures in their >> `__init__.py`. >> > > If the metadata is stored only in the metadata.py file, how does this > violate DRY? > Assuming you don't put a docstring on your packages, it doesn't. But I encourage a coding style where every package has a docstring, and in this case it'd violate DRY because you'd have the simpack description in two places: `__init__.py` and `metadata.py`. > > I don't see how requiring one line of boilerplate as part of the interface > is forcing a lot on module developers, considering that you're already > asking them to put the description as a string which is the first thing in > the file, name as a string in the 'name' variable, tags as a list, and the > version in __version__ -- this is a pretty funky specification format when > you think about it. > I guess that's subjective, I find these specs to pretty obvious. > > Anyways, it seems you've already chosen a method of implementation, so I > hope it works out well. > > - Tal > Thanks :) Ram.
_______________________________________________ Python-il mailing list [email protected] http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
