[Checkins] SVN: zopetoolkit/branches/ccomb/ replaced checknew.py with z3c.checkversions
Christophe Combelles
ccomb at free.fr
Sun May 16 14:29:01 EDT 2010
Log message for revision 112373:
replaced checknew.py with z3c.checkversions
Changed:
U zopetoolkit/branches/ccomb/buildout.cfg
D zopetoolkit/branches/ccomb/checknew.cfg
D zopetoolkit/branches/ccomb/checknew.py.in
-=-
Modified: zopetoolkit/branches/ccomb/buildout.cfg
===================================================================
--- zopetoolkit/branches/ccomb/buildout.cfg 2010-05-16 18:24:16 UTC (rev 112372)
+++ zopetoolkit/branches/ccomb/buildout.cfg 2010-05-16 18:29:01 UTC (rev 112373)
@@ -3,6 +3,7 @@
test-ztk
test-zopeapp
depgraph
+ checkversions
extensions = mr.developer
extends =
ztk.cfg
@@ -15,6 +16,7 @@
tl.eggdeps = 0.4
z3c.recipe.compattest = 0.12.1
z3c.recipe.depgraph = 0.5
+z3c.checkversions = 0.1
mr.developer = 1.10
# needed by mr.developer with python 2.4:
# we can upgrade to 1.2.7 as soon as it is released
@@ -35,3 +37,7 @@
extras = True
variants = base
scc
+
+[checkversions]
+recipe = zc.recipe.egg
+eggs = z3c.checkversions
Deleted: zopetoolkit/branches/ccomb/checknew.cfg
===================================================================
--- zopetoolkit/branches/ccomb/checknew.cfg 2010-05-16 18:24:16 UTC (rev 112372)
+++ zopetoolkit/branches/ccomb/checknew.cfg 2010-05-16 18:29:01 UTC (rev 112373)
@@ -1,23 +0,0 @@
-# to use it:
-# bin/buildout -c checknew.cfg
-# bin/python checknew.py
-
-[buildout]
-extends = buildout.cfg
-parts += check interpreter
-
-[check]
-recipe = collective.recipe.template
-input = checknew.py.in
-output = checknew.py
-
-[interpreter]
-recipe = zc.recipe.egg
-eggs =
- ${ztk:packages}
- ${ztk:unresolved-dependencies}
- ${zopeapp:packages}
-interpreter = python
-
-[versions]
-collective.recipe.template = 1.4
Deleted: zopetoolkit/branches/ccomb/checknew.py.in
===================================================================
--- zopetoolkit/branches/ccomb/checknew.py.in 2010-05-16 18:24:16 UTC (rev 112372)
+++ zopetoolkit/branches/ccomb/checknew.py.in 2010-05-16 18:29:01 UTC (rev 112373)
@@ -1,58 +0,0 @@
-import sys
-
-
-def main():
- import pkg_resources
- from pkg_resources import parse_requirements
- from setuptools.package_index import PackageIndex
-
- import socket
- print 'Setting socket time out to %d seconds' % 3
- socket.setdefaulttimeout(3)
-
- eggs = """${interpreter:eggs}"""
- ws = pkg_resources.require(eggs.split())
- 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/instance-py checknew.py")
-
-
-if __name__ == '__main__':
- args = sys.argv[1:]
- if '--help' in args:
- help()
- else:
- main()
More information about the checkins
mailing list