changeset 262:d1b8dc0abe68

use jquery from XStatic-jQuery package
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 26 Jun 2011 14:00:27 +0200
parents 51e077feea0b
children 85d1cbf6922a
files quickinstall quickinstall.bat setup.py wikiconfig.py
diffstat 4 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/quickinstall	Sat Jun 25 18:08:04 2011 +0200
+++ b/quickinstall	Sun Jun 26 14:00:27 2011 +0200
@@ -2,7 +2,7 @@
 # create a virtual environment in directory $DIR/
 # needs: curl or wget, unzip, gzip, tar, pip
 
-DIR=env
+DIR=envxs
 PYTHON=python
 
 virtualenv --no-site-packages --python $PYTHON $DIR
@@ -41,9 +41,6 @@
 download $DIR/jquery.fu/jquery.fileupload-ui.css https://www.github.com/blueimp/jQuery-File-Upload/raw/master/jquery.fileupload-ui.css
 download $DIR/jquery.fu/pbar-ani.gif https://www.github.com/blueimp/jQuery-File-Upload/raw/master/pbar-ani.gif
 
-mkdir $DIR/jquery
-download $DIR/jquery/jquery.min.js http://code.jquery.com/jquery-1.4.4.min.js
-
 download $DIR/svgweb.zip http://svgweb.googlecode.com/files/svgweb-2010-08-10-Owlephant-1.zip
 unzip -q -o -d $DIR/ $DIR/svgweb.zip
 
@@ -56,6 +53,8 @@
 
 # first install babel, moin's setup.py will emit a warning if it is not there
 pip install babel
+# first install XStatic, XStatic-jQuery's setup.py will fail if it is not there
+pip install XStatic
 
 # "install" moin2 from repo to the env, this will also install required python
 # packages from pypi. we do this LAST, so that breakage is better visible.
--- a/quickinstall.bat	Sat Jun 25 18:08:04 2011 +0200
+++ b/quickinstall.bat	Sun Jun 26 14:00:27 2011 +0200
@@ -28,9 +28,6 @@
 7za x env/svg-edit.tar.gz -y -oenv\
 7za x env/svg-edit.tar -y -oenv\
 
-mkdir env\jquery
-wget -nc http://code.jquery.com/jquery-1.4.4.min.js -Oenv/jquery/jquery.min.js
-
 wget -nc http://svgweb.googlecode.com/files/svgweb-2010-08-10-Owlephant-1.zip -Penv/
 7za x env/svgweb-2010-08-10-Owlephant-1.zip -y -oenv\
 
@@ -43,6 +40,9 @@
 echo Installing babel first ...
 pip install babel
 
+echo Installing XStatic first ...
+pip install XStatic
+
 echo Installing all required python packages from pypi ...
 pip install -e .
 
--- a/setup.py	Sat Jun 25 18:08:04 2011 +0200
+++ b/setup.py	Sun Jun 26 14:00:27 2011 +0200
@@ -90,6 +90,7 @@
         'Werkzeug==0.6.2', # use this if 0.7dev fails
         'py==1.3.4', # py.test 1.3.4 is needed by unit tests
         'sphinx', # needed to build the docs
+        'XStatic-jQuery',
     ],
     # optional features and their list of requirements
     extras_require = {
--- a/wikiconfig.py	Sat Jun 25 18:08:04 2011 +0200
+++ b/wikiconfig.py	Sun Jun 26 14:00:27 2011 +0200
@@ -57,7 +57,6 @@
         docs = os.path.join(wikiconfig_dir, 'docs', '_build', 'html'),
         # see "quickinstall" script about how to get those files there
         ckeditor = os.path.join(wikiconfig_dir, env_dir, 'ckeditor'),
-        jquery = os.path.join(wikiconfig_dir, env_dir, 'jquery'),
         svgweb = os.path.join(wikiconfig_dir, env_dir, 'svgweb', 'src'),
         anywikidraw = os.path.join(wikiconfig_dir, env_dir, 'AnyWikiDraw', 'anywikidraw', 'moinmoin'),
         twikidraw = os.path.join(wikiconfig_dir, env_dir, 'TWikiDrawPlugin'),
@@ -65,6 +64,12 @@
         fileupload = os.path.join(wikiconfig_dir, env_dir, 'jquery.fu'),
     )
 
+    # we slowly migrate all stuff from above (old) method, to xstatic (new) method,
+    # see https://bitbucket.org/thomaswaldmann/xstatic for details:
+    from xstatic.pkg.jquery import JQuery
+    j = JQuery(root_url='/static', provider='local', protocol='http')
+    serve_files.update([(j.name, j.get_mapping()[1])])
+
     # ^^^ DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO ^^^
 
     #item_root = u'Home' # change to some better value