Commit b3d19801 authored by Hanno Schlichting's avatar Hanno Schlichting

Added an allpy interpreter that has the same egg set as the alltests script....

Added an allpy interpreter that has the same egg set as the alltests script. Changed the checknew script to check all packages found on sys.path, instead of only direct dependencies of Zope2. Otherwise we'll miss out on new releases from the test-only dependencies
parent af8f5d5a
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
[buildout] [buildout]
extends = buildout.cfg extends = buildout.cfg
parts += alltests parts += alltests allpy
[alltests] [alltests]
recipe = zc.recipe.testrunner recipe = zc.recipe.testrunner
...@@ -83,3 +83,10 @@ eggs = ...@@ -83,3 +83,10 @@ eggs =
defaults = ['--module', '!^(zope[.]app)[.]'] defaults = ['--module', '!^(zope[.]app)[.]']
[allpy]
recipe = zc.recipe.egg
eggs = ${alltests:eggs}
interpreter = allpy
scripts = allpy
...@@ -10,25 +10,31 @@ def main(): ...@@ -10,25 +10,31 @@ def main():
print 'Setting socket time out to %d seconds' % 3 print 'Setting socket time out to %d seconds' % 3
socket.setdefaulttimeout(3) socket.setdefaulttimeout(3)
ws = pkg_resources.require('Zope2') env = pkg_resources.Environment()
pi = PackageIndex() env.scan()
names = [] names = []
installed = [] installed = []
for dist in ws: for name in env:
name = dist.project_name if name == 'python':
if name not in names: continue
names.append(name) distributions = env[name]
installed.append(dict( for dist in distributions:
dist=dist, name = dist.project_name
name=name, if name not in names:
req=parse_requirements(name).next(), names.append(name)
)) installed.append(dict(
dist=dist,
name=name,
req=parse_requirements(name).next(),
))
def _key(value): def _key(value):
return value['name'] return value['name']
installed.sort(key=_key) installed.sort(key=_key)
pi = PackageIndex()
upgrade = False upgrade = False
for info in installed: for info in installed:
print("Checking for new version of %s." % info['name']) print("Checking for new version of %s." % info['name'])
...@@ -46,7 +52,8 @@ def main(): ...@@ -46,7 +52,8 @@ def main():
def help(): def help():
print("Use this script via ./bin/zopepy inst/checknew.py.") print("Use this script via ./bin/allpy inst/checknew.py.")
print("You need to use the alltests.cfg config file for buildout.")
if __name__ == '__main__': if __name__ == '__main__':
......
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