diff options
author | Micah Lee <micah@micahflee.com> | 2020-10-15 16:30:30 -0700 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-10-15 16:30:30 -0700 |
commit | 5b2fe2019cdcfa6cedb844b5796133d3776dcf47 (patch) | |
tree | a92df0e293d4beb772e8165f2123803bb49cd508 /desktop | |
parent | 50e7471a49600c1788cc823a07781e724137a93c (diff) | |
download | onionshare-5b2fe2019cdcfa6cedb844b5796133d3776dcf47.tar.gz onionshare-5b2fe2019cdcfa6cedb844b5796133d3776dcf47.zip |
Make onionshare_cli an actual dependency of the GUI version
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/README.md | 27 | ||||
-rw-r--r-- | desktop/pyproject.toml | 1 | ||||
-rw-r--r-- | desktop/src/onionshare/__init__.py | 11 |
3 files changed, 27 insertions, 12 deletions
diff --git a/desktop/README.md b/desktop/README.md index 71f3082f..91977fda 100644 --- a/desktop/README.md +++ b/desktop/README.md @@ -90,4 +90,29 @@ If you want to run tests while hiding the GUI, you must have the `xvfb` package xvfb-run ./tests/run.sh ``` -## Making a release
\ No newline at end of file +## Making a release + +First, build a wheel package for OnionShare CLI: + +```sh +cd onionshare/cli +poetry install +poetry build +``` + +This will make a file like `dist/onionshare_cli-$VERSION-py3-none-any.whl` (except with your specific version number). Move it into `../desktop/linux`: + +``` +mkdir -p ../desktop/linux +mv dist/onionshare_cli-*-py3-none-any.whl ../desktop/linux +# change back to the desktop directory +cd ../desktop +``` + +Make sure the virtual environment is active, and then run `briefcase create` and `briefcase build`: + +```sh +. venv/bin/activate +briefcase create +briefcase build +```
\ No newline at end of file diff --git a/desktop/pyproject.toml b/desktop/pyproject.toml index a028aa2f..cf4ace2e 100644 --- a/desktop/pyproject.toml +++ b/desktop/pyproject.toml @@ -13,6 +13,7 @@ description = "OnionShare lets you securely and anonymously send and receive fil icon = "src/onionshare/resources/onionshare" sources = ['src/onionshare'] requires = [ + "./onionshare_cli-2.3.dev1-py3-none-any.whl", "Click", "eventlet", "Flask", diff --git a/desktop/src/onionshare/__init__.py b/desktop/src/onionshare/__init__.py index 131684db..287d882c 100644 --- a/desktop/src/onionshare/__init__.py +++ b/desktop/src/onionshare/__init__.py @@ -29,17 +29,6 @@ import psutil import getpass from PySide2 import QtCore, QtWidgets -# Allow importing onionshare_cli from the source tree -sys.path.insert( - 0, - os.path.join( - os.path.dirname( - os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - ), - "cli", - ), -) - from onionshare_cli.common import Common from .gui_common import GuiCommon |