Commits

Reimar Bauer committed a09f9b0

use XStatic-TWikiDraw-moin package, require it via setup.py, remove it from quickinstall scripts

  • Participants
  • Parent commits 57a8a41

Comments (0)

Files changed (5)

MoinMoin/templates/modify_twikidraw.html

 {% block data_editor %}
 <p>
 <applet code="CH.ifa.draw.twiki.TWikiDraw.class"
-        archive="{{ url_for('serve.files', name='twikidraw', filename='twikidraw.jar') }}"
+        archive="{{ url_for('serve.files', name='twikidraw_moin', filename='twikidraw_moin.jar') }}"
         width="800" height="620">
         <param name="drawpath" value="{{ url_for('frontend.get_item', item_name=item_name, member='drawing.draw') }}" />
         <param name="pngpath"  value="{{ url_for('frontend.get_item', item_name=item_name, member='drawing.png') }}" />
 # wikiconfig.py expects them. should be replaced by packaging.
 # we do this FIRST, so that breakage with pip install is better visible.
 
-download $DIR/twd.tgz http://static.moinmo.in/files/packages/TWikiDrawPlugin-moin.tar.gz
-tar xz -C $DIR/ -f $DIR/twd.tgz
-
 download $DIR/svgedit.tgz http://static.moinmo.in/files/packages/svg-edit.tar.gz
 tar xz -C $DIR/ -f $DIR/svgedit.tgz
 
 echo Getting some 3rd party stuff and unpack them into env/, where the default
 echo wikiconfig.py expects them (should be replaced by packaging) ...
 
-wget -nc http://static.moinmo.in/files/packages/TWikiDrawPlugin-moin.tar.gz -Penv/
-7za x env/TWikiDrawPlugin-moin.tar.gz -y -oenv\
-7za x env/TWikiDrawPlugin-moin.tar -y -oenv\
-
 wget -nc http://static.moinmo.in/files/packages/svg-edit.tar.gz -Penv/
 7za x env/svg-edit.tar.gz -y -oenv\
 7za x env/svg-edit.tar -y -oenv\
         'XStatic-jQuery',
         'XStatic-jQuery-File-Upload',
         'XStatic-svgweb',
+        'XStatic-TWikiDraw-moin',
     ],
     # optional features and their list of requirements
     extras_require = {
         docs = os.path.join(wikiconfig_dir, 'docs', '_build', 'html'),
         # see "quickinstall" script about how to get those files there
         anywikidraw = os.path.join(wikiconfig_dir, env_dir, 'AnyWikiDraw', 'anywikidraw', 'moinmoin'),
-        twikidraw = os.path.join(wikiconfig_dir, env_dir, 'TWikiDrawPlugin'),
         svgedit = os.path.join(wikiconfig_dir, env_dir, 'svg-edit'),
         mathjax = os.path.join(wikiconfig_dir, env_dir, 'MathJax'),
     )
     cke = CKEditor(root_url='/static', provider='local', protocol='http')
     serve_files.update([(cke.name, cke.get_mapping()[1])])
 
+    from xstatic.pkg.twikidraw_moin import TWikiDraw
+    twd = TWikiDraw(root_url='/static', provider='local', protocol='http')
+    serve_files.update([(twd.name, twd.get_mapping()[1])])
+
     # ^^^ DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO ^^^
 
     #item_root = u'Home' # change to some better value