1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
From: Elena Grandi <valhalla@debian.org>
Date: Thu, 6 Feb 2020 11:22:04 +0100
Subject: Use packaged js and css instead of xstatic ones.
Forwarded: not-needed
---
pyproject.toml | 9 ---------
src/bepasty.egg-info/requires.txt | 9 ---------
src/bepasty/bepasty_xstatic.py | 30 ++++++++++--------------------
3 files changed, 10 insertions(+), 38 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index bf3b9ff..7badb44 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -35,15 +35,6 @@ dependencies = [
"Flask",
"markupsafe",
"Pygments >= 2.12.0",
- "xstatic < 2.0.0",
- "XStatic-asciinema-player <= 2.6.1.1",
- "xstatic-bootbox >= 5.4.0, <= 5.5.1.1",
- "xstatic-bootstrap >=4.0.0.0, <= 4.5.3.1",
- "xstatic-font-awesome <= 4.7.0.0",
- "xstatic-jquery <= 3.5.1.1",
- "xstatic-jquery-ui <= 1.13.0.1",
- "xstatic-jquery-file-upload <= 10.31.0.1",
- "xstatic-pygments <= 2.9.0.1",
]
[project.scripts]
diff --git a/src/bepasty.egg-info/requires.txt b/src/bepasty.egg-info/requires.txt
index 2bc15b9..3ed619a 100644
--- a/src/bepasty.egg-info/requires.txt
+++ b/src/bepasty.egg-info/requires.txt
@@ -2,15 +2,6 @@ werkzeug
Flask
markupsafe
Pygments>=2.12.0
-xstatic<2.0.0
-XStatic-asciinema-player<=2.6.1.1
-xstatic-bootbox<=5.5.1.1,>=5.4.0
-xstatic-bootstrap<=4.5.3.1,>=4.0.0.0
-xstatic-font-awesome<=4.7.0.0
-xstatic-jquery<=3.5.1.1
-xstatic-jquery-ui<=1.13.0.1
-xstatic-jquery-file-upload<=10.31.0.1
-xstatic-pygments<=2.9.0.1
[magic]
python-magic
diff --git a/src/bepasty/bepasty_xstatic.py b/src/bepasty/bepasty_xstatic.py
index 6bcb3bd..6f114e7 100644
--- a/src/bepasty/bepasty_xstatic.py
+++ b/src/bepasty/bepasty_xstatic.py
@@ -1,20 +1,10 @@
-from xstatic.main import XStatic
-
-# names below must be package names
-mod_names = [
- 'asciinema_player',
- 'bootbox',
- 'bootstrap',
- 'font_awesome',
- 'jquery',
- 'jquery_ui',
- 'jquery_file_upload',
- 'pygments',
-]
-
-pkg = __import__('xstatic.pkg', fromlist=mod_names)
-serve_files = {}
-for mod_name in mod_names:
- mod = getattr(pkg, mod_name)
- xs = XStatic(mod, root_url='/static', provider='local', protocol='http')
- serve_files[xs.name] = xs.base_dir
+serve_files = {
+ 'asciinema_player': '',
+ 'bootbox': '/usr/share/javascript/bootbox/',
+ 'bootstrap': '/usr/share/javascript/bootstrap4/',
+ 'font_awesome': '/usr/share/fonts-font-awesome/',
+ 'jquery': '/usr/share/javascript/jquery/',
+ 'jquery_ui': '/usr/share/javascript/jquery-ui/',
+ 'jquery_file_upload': '/usr/share/javascript/jquery-file-upload/',
+ 'pygments': '/usr/share/javascript/bepasty-pygments/',
+ }
|