Commit 51332b4c authored by Hanno Schlichting's avatar Hanno Schlichting

Include checkversions

parent 2f1bd717
[buildout]
extensions = buildout.dumppickedversions
develop = .
parts =
test
scripts
zopepy
docs
alltests
allpy
docs
checkversions
extends = versions.cfg
unzip = true
......@@ -29,11 +32,6 @@ interpreter = zopepy
scripts = zopepy
[docs]
recipe = zc.recipe.egg
eggs = sphinx
[alltests]
recipe = zc.recipe.testrunner
eggs =
......@@ -124,3 +122,13 @@ recipe = zc.recipe.egg
eggs = ${alltests:eggs}
interpreter = allpy
scripts = allpy
[docs]
recipe = zc.recipe.egg
eggs = Sphinx
[checkversions]
recipe = zc.recipe.egg
eggs = z3c.checkversions
import sys
def main():
import pkg_resources
from pkg_resources import parse_requirements
from setuptools.package_index import PackageIndex
ws = pkg_resources.require('Zope2')
pi = PackageIndex()
names = []
installed = []
for dist in ws:
name = dist.project_name
if name not in names:
names.append(name)
installed.append(dict(
dist=dist,
name=name,
req=parse_requirements(name).next(),
))
def _key(value):
return value['name']
installed.sort(key=_key)
upgrade = False
for info in installed:
print("Checking for new version of %s." % info['name'])
new_dist = pi.obtain(info['req'])
if new_dist.parsed_version > info['dist'].parsed_version:
upgrade = True
print()
print("Newer version for %s found. Installed: %s - found: %s" %
(info['name'], info['dist'].version, new_dist.version))
print("Newer version available at: %s" % new_dist.location)
print()
if not upgrade:
print("No updates have been found. All packages use current versions.")
def help():
print("Use this script via ./bin/zopepy inst/checknew.py.")
if __name__ == '__main__':
args = sys.argv[1:]
if '--help' in args:
help()
else:
main()
......@@ -4,6 +4,7 @@ versions = versions
[versions]
Zope2 =
Acquisition = 2.13.3
buildout.dumppickedversions = 0.4
ClientForm = 0.2.10
DateTime = 2.12.2
distribute = 0.6.13
......@@ -28,6 +29,7 @@ Sphinx = 0.6.5
tempstorage = 2.11.2
ThreadLock = 2.13.0
transaction = 1.0.0
z3c.checkversions = 0.2
zc.buildout = 1.4.3
zc.lockfile = 1.0.0
zc.recipe.egg = 1.2.2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment