At 11:32 AM 1/30/2010 +1100, Ben Finney wrote:
That assumes that the only things that will need to query the package's version are Python modules. That's often not the case, especially when there are other tools (e.g. shell programs, make files, or any program not written in Python) that are part of the same package. Better would be to have a *non-executable* data file containing the version string and other such package meta-data. “Query the metadata” should not necessarily imply “parse or execute a bunch of Python code”.

Which is precisely why that way's better; pkg_resources is just parsing the info from a PKG-INFO file -- or more commonly, just parsing a file or directory *name*, without even opening a file. So other tools can certainly do the same.

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

Reply via email to