diff options
author | Micah Lee <micah@micahflee.com> | 2020-11-08 13:34:19 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-11-08 13:34:19 -0800 |
commit | 06c4b6381bb532b2abb240a63348c6b7a77db77b (patch) | |
tree | 7f2ff01b8949243d8116992b22014cc3d7e6e07a /cli | |
parent | 46a9434fbfa14b4545f7f5f12f3bd3a2cc3621c9 (diff) | |
download | onionshare-06c4b6381bb532b2abb240a63348c6b7a77db77b.tar.gz onionshare-06c4b6381bb532b2abb240a63348c6b7a77db77b.zip |
Fix get_resource_path to work with python eggs, move appdata xml file to src so flatpak can see it, reduce python dependencies, and update release docs
Diffstat (limited to 'cli')
-rw-r--r-- | cli/onionshare_cli/common.py | 7 | ||||
-rw-r--r-- | cli/pyproject.toml | 8 |
2 files changed, 6 insertions, 9 deletions
diff --git a/cli/onionshare_cli/common.py b/cli/onionshare_cli/common.py index 74bd7a56..b621f3a1 100644 --- a/cli/onionshare_cli/common.py +++ b/cli/onionshare_cli/common.py @@ -29,6 +29,7 @@ import tempfile import threading import time import shutil +from pkg_resources import resource_filename from .settings import Settings @@ -73,11 +74,7 @@ class Common: """ Returns the absolute path of a resource """ - resources_path = os.path.join( - os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))), - "resources", - ) - path = os.path.join(resources_path, filename) + path = resource_filename("onionshare_cli", os.path.join("resources", filename)) self.log("Common", "get_resource_path", path) return path diff --git a/cli/pyproject.toml b/cli/pyproject.toml index e70e5048..fc748a7c 100644 --- a/cli/pyproject.toml +++ b/cli/pyproject.toml @@ -17,12 +17,12 @@ classifiers = [ [tool.poetry.dependencies] python = "^3.6" -Click = "*" -Flask = "*" -Flask-HTTPAuth = "*" +click = "*" +flask = "*" +flask-httpauth = "*" flask-socketio = "*" pycryptodome = "*" -PySocks = "*" +pysocks = "*" requests = "*" stem = "*" urllib3 = "*" |