[Checkins] SVN: hurry.js.wforms/trunk/ Fix up hurry.resource integration with wforms.

Martijn Faassen faassen at infrae.com
Sun Dec 14 09:42:00 EST 2008


Log message for revision 94057:
  Fix up hurry.resource integration with wforms.
  

Changed:
  _U  hurry.js.wforms/trunk/
  U   hurry.js.wforms/trunk/README.txt
  U   hurry.js.wforms/trunk/buildout.cfg
  U   hurry.js.wforms/trunk/setup.py
  _U  hurry.js.wforms/trunk/src/hurry/js/wforms/
  U   hurry.js.wforms/trunk/src/hurry/js/wforms/__init__.py
  A   hurry.js.wforms/trunk/src/hurry/js/wforms/_wforms.py
  A   hurry.js.wforms/trunk/src/hurry/js/wforms/configure.zcml
  D   hurry.js.wforms/trunk/src/hurry/js/wforms/download.py
  D   hurry.js.wforms/trunk/src/hurry/js/wforms/prepare.py
  D   hurry.js.wforms/trunk/src/hurry/js/wforms/wforms.py

-=-

Property changes on: hurry.js.wforms/trunk
___________________________________________________________________
Added: svn:ignore
   + develop-eggs
bin
.installed.cfg
parts



Modified: hurry.js.wforms/trunk/README.txt
===================================================================
--- hurry.js.wforms/trunk/README.txt	2008-12-14 14:35:00 UTC (rev 94056)
+++ hurry.js.wforms/trunk/README.txt	2008-12-14 14:42:00 UTC (rev 94057)
@@ -35,20 +35,3 @@
 .. _`hurry.zoperesource`: http://pypi.python.org/pypi/hurry.zoperesource
 
 .. _Grok: http://grok.zope.org
-
-Preparing hurry.js.wforms before release
-========================================
-
-This section is only relevant to release managers of ``hurry.js.wforms``; if 
-you don't know whether you are, you aren't.
-
-When releasing ``hurry.js.wforms``, an extra step should be
-taken. Follow the regular package `release instructions`_, but before
-egg generation (``python setup.py register sdist upload``) first
-execute ``bin/wformsprepare <version number>`` (you may have to run
-``buildout`` first to install the prepare command), where version
-number is the version of the wforms release, such as ``1.0``. This will
-download the code of that version and place it in the egg. After that
-you can upload it.
-
-.. _`release instructions`: http://grok.zope.org/documentation/how-to/releasing-software

Modified: hurry.js.wforms/trunk/buildout.cfg
===================================================================
--- hurry.js.wforms/trunk/buildout.cfg	2008-12-14 14:35:00 UTC (rev 94056)
+++ hurry.js.wforms/trunk/buildout.cfg	2008-12-14 14:42:00 UTC (rev 94057)
@@ -7,14 +7,14 @@
 
 [scripts]
 recipe = zc.recipe.egg:scripts
-eggs = hurry.tinymce
+eggs = hurry.js.wforms
 
 [devpython]
 recipe = zc.recipe.egg
 interpreter = devpython
-eggs = hurry.tinymce
+eggs = hurry.js.wforms
 
 [test]
 recipe = zc.recipe.testrunner
-eggs = hurry.tinymce
+eggs = hurry.js.wforms
 defaults = ['--tests-pattern', '^f?tests$', '-v']

Modified: hurry.js.wforms/trunk/setup.py
===================================================================
--- hurry.js.wforms/trunk/setup.py	2008-12-14 14:35:00 UTC (rev 94056)
+++ hurry.js.wforms/trunk/setup.py	2008-12-14 14:42:00 UTC (rev 94057)
@@ -17,7 +17,7 @@
     )
 
 setup(
-    name='hurry.js.wforms2',
+    name='hurry.js.wforms',
     version=WFORMS_VERSION + 'dev',
     description="wforms for hurry.resource.",
     long_description=long_description,
@@ -35,10 +35,4 @@
         'setuptools',
         'hurry.resource',
         ],
-    entry_points= {
-    'console_scripts': [
-      'wformsprepare = hurry.js.wforms.prepare:main',
-      ]
-    },
-
     )


Property changes on: hurry.js.wforms/trunk/src/hurry/js/wforms
___________________________________________________________________
Added: svn:externals
   + resources http://wforms.googlecode.com/svn/tags/3.0/build 


Modified: hurry.js.wforms/trunk/src/hurry/js/wforms/__init__.py
===================================================================
--- hurry.js.wforms/trunk/src/hurry/js/wforms/__init__.py	2008-12-14 14:35:00 UTC (rev 94056)
+++ hurry.js.wforms/trunk/src/hurry/js/wforms/__init__.py	2008-12-14 14:42:00 UTC (rev 94057)
@@ -1 +1 @@
-from hurry.base2.base2 import *
+from hurry.js.wforms._wforms import *

Copied: hurry.js.wforms/trunk/src/hurry/js/wforms/_wforms.py (from rev 94056, hurry.js.wforms/trunk/src/hurry/js/wforms/wforms.py)
===================================================================
--- hurry.js.wforms/trunk/src/hurry/js/wforms/_wforms.py	                        (rev 0)
+++ hurry.js.wforms/trunk/src/hurry/js/wforms/_wforms.py	2008-12-14 14:42:00 UTC (rev 94057)
@@ -0,0 +1,14 @@
+from hurry.resource import Library, ResourceInclusion
+
+wforms_lib = Library('wforms')
+
+# includes the base2 library (1.0b2)
+wforms = ResourceInclusion(wforms_lib,
+                           'wforms.js',
+                           minified='wforms_pack.js')
+
+# not very useful right now, but in the future we might pack the base2
+# library and make this depend on it
+wforms_alone = ResourceInclusion(wforms_lib,
+                                 'wforms_alone.js',
+                                 minified='wforms_alone_pack.js')

Added: hurry.js.wforms/trunk/src/hurry/js/wforms/configure.zcml
===================================================================
--- hurry.js.wforms/trunk/src/hurry/js/wforms/configure.zcml	                        (rev 0)
+++ hurry.js.wforms/trunk/src/hurry/js/wforms/configure.zcml	2008-12-14 14:42:00 UTC (rev 94057)
@@ -0,0 +1,10 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+           xmlns:browser="http://namespaces.zope.org/browser">
+
+  <!-- this configure.zcml should only be loaded in a zope context -->
+
+  <browser:resourceDirectory 
+      name="wforms"
+      directory="resources" />
+
+</configure>

Deleted: hurry.js.wforms/trunk/src/hurry/js/wforms/download.py
===================================================================
--- hurry.js.wforms/trunk/src/hurry/js/wforms/download.py	2008-12-14 14:35:00 UTC (rev 94056)
+++ hurry.js.wforms/trunk/src/hurry/js/wforms/download.py	2008-12-14 14:42:00 UTC (rev 94057)
@@ -1,45 +0,0 @@
-import urllib2
-import tempfile, shutil
-import os
-
-SF_URL_TEMPLATE = 'http://sourceforge.net/project/downloading.php?groupname=tinymce&filename=tinymce_%s.zip'
-
-def download(version, callback):
-    """Download a tinymce of version.
-
-    When downloaded, call callback with path to directory
-    with an extracted tinymce. The callback will then be able to copy
-    this to the appropriate location.
-    """
-    url = SF_URL_TEMPLATE % version.replace('.', '_')
-    f = urllib2.urlopen(url)
-    data = f.read()
-    f.close()
-
-    download_url = find_a_href(data, 'direct link')
-
-    f = urllib2.urlopen(download_url)
-    file_data = f.read()
-    f.close()
-
-    dirpath = tempfile.mkdtemp()
-    try:
-        tinymce_path = os.path.join(dirpath, 'tinymce.zip')
-        ex_path = os.path.join(dirpath, 'tinymce_ex')
-        g = open(tinymce_path, 'wb')
-        g.write(file_data)
-        g.close()
-        os.system('unzip -qq "%s" -d "%s"' % (tinymce_path, ex_path))
-        callback(ex_path)
-    finally:
-        shutil.rmtree(dirpath, ignore_errors=True)
-
-def find_a_href(data, content):
-    """Given start of content of the <a href="">content</a> find href.
-    """
-    i = data.find(content)
-    a = '<a href="'
-    href_start = data.rfind(a, 0, i)
-    href_start += len(a)
-    href_end = data.find('"', href_start)
-    return data[href_start:href_end]

Deleted: hurry.js.wforms/trunk/src/hurry/js/wforms/prepare.py
===================================================================
--- hurry.js.wforms/trunk/src/hurry/js/wforms/prepare.py	2008-12-14 14:35:00 UTC (rev 94056)
+++ hurry.js.wforms/trunk/src/hurry/js/wforms/prepare.py	2008-12-14 14:42:00 UTC (rev 94057)
@@ -1,25 +0,0 @@
-import os, sys
-import shutil
-
-from hurry.wforms.download import download
-
-def main():
-    try:
-        version = sys.argv[1]
-    except IndexError:
-        print "Usage: wformsprepare <wforms version>"
-        return
-
-    # download library into package
-    package_dir = os.path.dirname(__file__)
-    dest_path = os.path.join(package_dir, 'resources')
-
-    # remove previous library
-    shutil.rmtree(dest_path, ignore_errors=True)
-
-    def copy(ex_path):
-        """Copy to location 'resources' in package."""
-        build_path = os.path.join(ex_path, 'tinymce', 'jscripts', 'tiny_mce')
-        shutil.copytree(build_path, dest_path)
-
-    download(version, copy)

Deleted: hurry.js.wforms/trunk/src/hurry/js/wforms/wforms.py
===================================================================
--- hurry.js.wforms/trunk/src/hurry/js/wforms/wforms.py	2008-12-14 14:35:00 UTC (rev 94056)
+++ hurry.js.wforms/trunk/src/hurry/js/wforms/wforms.py	2008-12-14 14:42:00 UTC (rev 94057)
@@ -1,12 +0,0 @@
-from hurry.resource import Library, ResourceInclusion
-
-base2_lib = Library('base2')
-
-dom = ResourceInclusion(base2_lib,
-                        'src/base2-dom-strict.js',
-                        minified='base2-dom-p.js')
-
-                        
-tinymce = ResourceInclusion(tinymce_lib, 'tiny_mce_src.js',
-                            minified='tiny_mce.js')
-



More information about the Checkins mailing list