[Checkins] SVN: hurry.extjs/trunk/ Leave the user the task of extract and publish the resource directory
Santiago Videla
santiago.videla at gmail.com
Mon May 4 17:50:06 EDT 2009
Log message for revision 99748:
Leave the user the task of extract and publish the resource directory
Changed:
U hurry.extjs/trunk/README.txt
U hurry.extjs/trunk/setup.py
U hurry.extjs/trunk/src/hurry/extjs/basic.txt
U hurry.extjs/trunk/src/hurry/extjs/configure.zcml
U hurry.extjs/trunk/src/hurry/extjs/extjs.py
-=-
Modified: hurry.extjs/trunk/README.txt
===================================================================
--- hurry.extjs/trunk/README.txt 2009-05-04 21:27:52 UTC (rev 99747)
+++ hurry.extjs/trunk/README.txt 2009-05-04 21:50:06 UTC (rev 99748)
@@ -13,21 +13,38 @@
How to use?
===========
-ExtJS_ is distributed under the terms of the GPL v3 :
-
-- http://extjs.com/products/license.php
-
In order to avoid licenses conflicts, first you need to download ExtJS_ and place it in your
-home directory. Once it's finished, add `hurry.extjs` to your setup.py and run ./bin/buildout::
+project. Once it's finished, add `hurry.zoperesource` and `hurry.extjs` to your setup.py
+and run ./bin/buildout::
install_requires=[
...,
- 'hurry.extjs==2.2.1',
+ 'hurry.zoperesource'
+ 'hurry.extjs',
],
-`hurry.extjs` will try to extract and copy the sources of ExtJS to a known location.
-Note that you `must` always download and include the same versions of ExtJS_ and `hurry.extjs`
+Next step, it's to publish the sources of ExtJS as a resource directory. Using Grok,
+you should have something like this in your configure.zcml::
+ <configure xmlns="http://namespaces.zope.org/zope"
+ xmlns:grok="http://namespaces.zope.org/grok"
+ xmlns:browser="http://namespaces.zope.org/browser">
+
+ <include package="grok" />
+ <includeDependencies package="." />
+ <grok:grok package="." />
+
+ <include package="hurry.zoperesource" />
+
+ <browser:resourceDirectory
+ name="extjs"
+ directory="ext-2.2.1" />
+
+ </configure>
+
+`hurry.extjs` will look for the resourceDirectory named `extjs`, so it's important that
+you use the same name in the resourceDirectory statement.
+
Now, you can import ``extjs`` like this::
from hurry.extjs import extjs_all, extjs_css
Modified: hurry.extjs/trunk/setup.py
===================================================================
--- hurry.extjs/trunk/setup.py 2009-05-04 21:27:52 UTC (rev 99747)
+++ hurry.extjs/trunk/setup.py 2009-05-04 21:50:06 UTC (rev 99748)
@@ -1,28 +1,6 @@
from setuptools import setup, find_packages
import sys, os, shutil, tempfile
-EXTJS_VERSION = '2.2.1'
-
-extzip = os.path.expanduser('~') + '/ext-%s.zip' % EXTJS_VERSION
-
-dirpath = tempfile.mkdtemp()
-extjs_path = os.path.join(dirpath, 'extjs.zip')
-ex_path = os.path.join(dirpath, 'extjs_ex')
-try:
- shutil.copy(extzip, extjs_path)
- os.system('unzip -qq "%s" -d "%s"' % (extjs_path, ex_path))
-
- package_dir = './src/hurry/extjs/'
- dest_path = os.path.join(package_dir, 'extjs-build')
-
- # remove previous ExtJS
- shutil.rmtree(dest_path, ignore_errors=True)
-
- build_path = os.path.join(ex_path)
- shutil.copytree(build_path, dest_path)
-finally:
- shutil.rmtree(dirpath, ignore_errors=True)
-
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
@@ -37,7 +15,7 @@
setup(
name='hurry.extjs',
- version=EXTJS_VERSION + 'dev',
+ version='0.1dev',
description="ExtJS for hurry.resource.",
long_description=long_description,
classifiers=[],
Modified: hurry.extjs/trunk/src/hurry/extjs/basic.txt
===================================================================
--- hurry.extjs/trunk/src/hurry/extjs/basic.txt 2009-05-04 21:27:52 UTC (rev 99747)
+++ hurry.extjs/trunk/src/hurry/extjs/basic.txt 2009-05-04 21:50:06 UTC (rev 99748)
@@ -32,13 +32,13 @@
>>> needed.need(extjs.extjs_all)
>>> print needed.render()
<link rel="stylesheet" type="text/css" href="http://localhost/static/extjs/resources/css/ext-all.css" />
- <script type="text/javascript" src="http://localhost/static/extjs/ext-base.js"></script>
+ <script type="text/javascript" src="http://localhost/static/extjs/ext-core.js"></script>
<script type="text/javascript" src="http://localhost/static/extjs/ext-all.js"></script>
>>> needed.mode('debug')
>>> print needed.render()
<link rel="stylesheet" type="text/css" href="http://localhost/static/extjs/resources/css/ext-all.css" />
- <script type="text/javascript" src="http://localhost/static/extjs/ext-base-debug.js"></script>
+ <script type="text/javascript" src="http://localhost/static/extjs/ext-core-debug.js"></script>
<script type="text/javascript" src="http://localhost/static/extjs/ext-all-debug.js"></script>
Modified: hurry.extjs/trunk/src/hurry/extjs/configure.zcml
===================================================================
--- hurry.extjs/trunk/src/hurry/extjs/configure.zcml 2009-05-04 21:27:52 UTC (rev 99747)
+++ hurry.extjs/trunk/src/hurry/extjs/configure.zcml 2009-05-04 21:50:06 UTC (rev 99748)
@@ -1,9 +1,3 @@
<configure xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser">
- <include package="hurry.zoperesource" />
-
- <browser:resourceDirectory
- name="extjs"
- directory="extjs-build" />
-
</configure>
Modified: hurry.extjs/trunk/src/hurry/extjs/extjs.py
===================================================================
--- hurry.extjs/trunk/src/hurry/extjs/extjs.py 2009-05-04 21:27:52 UTC (rev 99747)
+++ hurry.extjs/trunk/src/hurry/extjs/extjs.py 2009-05-04 21:50:06 UTC (rev 99748)
@@ -2,8 +2,8 @@
extjs = Library('extjs')
-extjs_base = ResourceInclusion(extjs, 'ext-base.js',
- debug='ext-base-debug.js')
+extjs_core = ResourceInclusion(extjs, 'ext-core.js',
+ debug='ext-core-debug.js')
extjs_all = ResourceInclusion(extjs, 'ext-all.js', depends=[extjs_base],
debug='ext-all-debug.js')
More information about the Checkins
mailing list