summaryrefslogtreecommitdiffstats
path: root/module/lib/jinja2/_markupsafe/_bundle.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-08 17:37:43 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-06-08 17:37:44 +0200
commit2cf160d497e501bf254bd8be054c0f5880ab90ca (patch)
tree03a720b6142cc03fe7ef258fa8d17da92b30a462 /module/lib/jinja2/_markupsafe/_bundle.py
parentMerge pull request #151 from vuolter/invertedconf (diff)
downloadpyload-2cf160d497e501bf254bd8be054c0f5880ab90ca.tar.xz
restructured webui to single-page-app, removed jinja
Diffstat (limited to 'module/lib/jinja2/_markupsafe/_bundle.py')
-rw-r--r--module/lib/jinja2/_markupsafe/_bundle.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/module/lib/jinja2/_markupsafe/_bundle.py b/module/lib/jinja2/_markupsafe/_bundle.py
deleted file mode 100644
index e694faf23..000000000
--- a/module/lib/jinja2/_markupsafe/_bundle.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# -*- coding: utf-8 -*-
-"""
- jinja2._markupsafe._bundle
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- This script pulls in markupsafe from a source folder and
- bundles it with Jinja2. It does not pull in the speedups
- module though.
-
- :copyright: Copyright 2010 by the Jinja team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
-import sys
-import os
-import re
-
-
-def rewrite_imports(lines):
- for idx, line in enumerate(lines):
- new_line = re.sub(r'(import|from)\s+markupsafe\b',
- r'\1 jinja2._markupsafe', line)
- if new_line != line:
- lines[idx] = new_line
-
-
-def main():
- if len(sys.argv) != 2:
- print 'error: only argument is path to markupsafe'
- sys.exit(1)
- basedir = os.path.dirname(__file__)
- markupdir = sys.argv[1]
- for filename in os.listdir(markupdir):
- if filename.endswith('.py'):
- f = open(os.path.join(markupdir, filename))
- try:
- lines = list(f)
- finally:
- f.close()
- rewrite_imports(lines)
- f = open(os.path.join(basedir, filename), 'w')
- try:
- for line in lines:
- f.write(line)
- finally:
- f.close()
-
-
-if __name__ == '__main__':
- main()