[Checkins] SVN: hurry.jquery/trunk/ Added zest.releaser and using its entry point functionality to automatically download jquery in the prerelease step

Reinout van Rees reinout at vanrees.org
Fri Nov 27 09:19:45 EST 2009


Log message for revision 106065:
  Added zest.releaser and using its entry point functionality to automatically download jquery in the prerelease step

Changed:
  U   hurry.jquery/trunk/buildout.cfg
  U   hurry.jquery/trunk/setup.py
  U   hurry.jquery/trunk/src/hurry/jquery/prepare.py

-=-
Modified: hurry.jquery/trunk/buildout.cfg
===================================================================
--- hurry.jquery/trunk/buildout.cfg	2009-11-27 14:07:32 UTC (rev 106064)
+++ hurry.jquery/trunk/buildout.cfg	2009-11-27 14:19:45 UTC (rev 106065)
@@ -4,10 +4,13 @@
 versions = versions
 
 [versions]
+zest.releaser = 3.0
 
 [scripts]
 recipe = zc.recipe.egg
-eggs = hurry.jquery
+eggs = 
+    hurry.jquery
+    zest.releaser
 
 [test]
 recipe = zc.recipe.testrunner

Modified: hurry.jquery/trunk/setup.py
===================================================================
--- hurry.jquery/trunk/setup.py	2009-11-27 14:07:32 UTC (rev 106064)
+++ hurry.jquery/trunk/setup.py	2009-11-27 14:19:45 UTC (rev 106065)
@@ -40,6 +40,9 @@
         'console_scripts': [
             'jqueryprepare = hurry.jquery.prepare:main',
             ],
+        'zest.releaser.prereleaser.middle': [
+            'prepare = hurry.jquery.prepare:entrypoint',
+            ],
         },
     extras_require={
         'zopesupport': ['hurry.zoperesource'],

Modified: hurry.jquery/trunk/src/hurry/jquery/prepare.py
===================================================================
--- hurry.jquery/trunk/src/hurry/jquery/prepare.py	2009-11-27 14:07:32 UTC (rev 106064)
+++ hurry.jquery/trunk/src/hurry/jquery/prepare.py	2009-11-27 14:19:45 UTC (rev 106065)
@@ -11,7 +11,7 @@
 FULL = "jquery-%s.js" % VERSION
 
 
-def main():
+def prepare_jquery():
     package_dir = os.path.dirname(__file__)
     jquery_dest_path = os.path.join(package_dir, 'jquery-build')
 
@@ -44,3 +44,16 @@
     module = open(py_path, 'w')
     module.write(code)
     module.close()
+
+
+def main():
+    # Commandline tool
+    prepare_jquery()
+
+
+def entrypoint(data):
+    """Entry point for zest.releaser's prerelease script"""
+    # We could grab data['new_version'] and omit the .1 suffix from it to get
+    # the jquery version.  Could do away with a bit of version number
+    # duplication.
+    prepare_jquery()



More information about the checkins mailing list