Bug#628678: lintian: please check that setup.py and debian/changelog have same version
* Lars Wirzenius <liw@liw.fi>, 2011-06-04, 23:15:
Personally I feel that running setup.py code inside the package is a
"no-go" for Lintian; perhaps there is another way we can "trivially"
extract it from setup.py?
Not running code is a very good point. Unfortunately, there is no other
portable way, since the setup.py code may be executing code to extract
the version number from elsewhere (and frequently does, for my own
packages: "import foo" and then using foo.__version__ for the version
number).
However, this piece of metadata often ends up in the binary package,
where lintian could read it easily. I implemented a check for this in my
lintian-like application:
https://bitbucket.org/jwilk/lintian4python/src/3b171d8ed0e8/checks/egg-info
https://bitbucket.org/jwilk/lintian4python/src/3b171d8ed0e8/checks/egg-info.desc
The check is written in a very defensive way so that there are almost no
false-positives, yet number of true positives is surprisingly high (a
few dozens IIRC).
If someone (hint, hint) contributes a better tag description, and
possibly a better name than egg-info-version-mismatch, I can port this
code to lintian proper.
--
Jakub Wilk
Reply to: