[Distutils] PEP 376 APIs reworked (was: Re: PEP 376 comments)
Tarek Ziadé
ziade.tarek at gmail.com
Sat Jun 13 10:08:33 CEST 2009
On Fri, Jun 12, 2009 at 10:08 PM, Kevin Teague<kevin at bud.ca> wrote:
> The code is much more readable with the Distribution root name in the
> classes now I think.
>
> I've made a small tweak the code and changed the _DistributionMetadata
> class to a _parse_distribution_metadata function instead. I think the
> code is a bit simpler this way, since then the
> DistributionDirectory.metadata attribute is just a straight
> distutils.dist.DistributionMetadata class.
Well, when PEP 376 will be applied in Distutils and pkgutil, I would
rather have a DistributionMetadata class
that handles writing *and* reading of PKG-INFO files, so it feels more
natural to me to add the reading
feature within the class rather than in a function wrapper.
Plus, it makes it possible for third-party tools to instanciate
DistributionMetadata to work with this file,
which would be impossible if the code we add is a private function.
Also, Phillip proposed to move this class to pkgutil and remove it
from Distutils, which makes sense,
so maybe we should take the whole class and put it in pkgutil, maybe
in its own "metadata" module,
e.g. make pkgutil become a package so pkgutil.py doesn't grow too much
> (oh, and that changeset also contains a t
A cool, that was a bad renaming, I'll apply that change thx
I am adding you as a developer in bitbucket to simplify things
Thanks
Tarek
> _______________________________________________
> Distutils-SIG maillist - Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig
>
--
Tarek Ziadé | http://ziade.org
More information about the Distutils-SIG
mailing list