From 3a00f977849b8d96a98236a5163d38a448103a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 24 Apr 2023 18:03:55 +0200 Subject: Hopefully fix installation issues. --- MANIFEST.in | 1 + mu4web/main.py | 7 ++++--- setup.cfg | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..646cf51 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include mu4web/static/* diff --git a/mu4web/main.py b/mu4web/main.py index 681041e..c147ab7 100644 --- a/mu4web/main.py +++ b/mu4web/main.py @@ -149,7 +149,7 @@ def page_base(title: Optional[str] = None, ('meta', {'name': 'viewport', 'content': 'width=device-width, initial-scale=0.5'}), ('title', title, ' — Mu4Web'), - include_stylesheet('/static/style.css'), + include_stylesheet(url_for('static', 'style.css')), ), ('body', ('nav', @@ -500,7 +500,7 @@ class IMGParser(HTMLParser): self.result += f' {key}="{data}"' key = 'src' - data = '/static/content-blocked.svg' + data = url_for('static', 'content-blocked.svg') self.result += f' {key}="{data}"' else: key = html.escape(key) @@ -571,7 +571,8 @@ def attachement_part_page(): # above, which unblocks it. # TODO this "fails" for images wrapped in anchor tags, since # the anchor tag has priority. - result += "\n" + url = url_for('static', 'enable_images.js') + result += f"\n" return str(result) diff --git a/setup.cfg b/setup.cfg index d8756da..688b4fa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,8 +24,10 @@ install_requires = # python-pam >= 2.0.2 for pam integration setup_requires = setuptools -py_modules = mu4web -packages = mu4web +packages = find: +include_package_data = True + +[options.packages.find] [flake8] ignore = E731 -- cgit v1.2.3