mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-10 03:37:28 -03:00
Make onionshare_cli an actual dependency of the GUI version
This commit is contained in:
parent
50e7471a49
commit
5b2fe2019c
5 changed files with 42 additions and 19 deletions
|
@ -27,13 +27,13 @@ First, make sure you have `tor` installed. In Linux, install it through your pac
|
||||||
|
|
||||||
Then install OnionShare CLI:
|
Then install OnionShare CLI:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
pip install onionshare-cli
|
pip install onionshare-cli
|
||||||
```
|
```
|
||||||
|
|
||||||
Then run it with:
|
Then run it with:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
onionshare-cli --help
|
onionshare-cli --help
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -43,25 +43,33 @@ You must have python3 and [poetry](https://python-poetry.org/) installed.
|
||||||
|
|
||||||
Install dependencies with poetry:
|
Install dependencies with poetry:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
poetry install
|
poetry install
|
||||||
```
|
```
|
||||||
|
|
||||||
To run from the source tree:
|
To run from the source tree:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
poetry run onionshare-cli
|
poetry run onionshare-cli
|
||||||
```
|
```
|
||||||
|
|
||||||
To run tests:
|
To run tests:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
poetry run pytest -v ./tests
|
poetry run pytest -v ./tests
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Build a wheel package
|
||||||
|
|
||||||
|
```sh
|
||||||
|
poetry build
|
||||||
|
```
|
||||||
|
|
||||||
|
This will create `dist/onionshare_cli-$VERSION-py3-none-any.whl`.
|
||||||
|
|
||||||
### Making a release
|
### Making a release
|
||||||
|
|
||||||
Before making a release, make update the version in these places:
|
Before making a release, update the version in these places:
|
||||||
|
|
||||||
- `pyproject.toml`
|
- `pyproject.toml`
|
||||||
- `onionshare_cli/resources/version.txt`
|
- `onionshare_cli/resources/version.txt`
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "onionshare_cli"
|
name = "onionshare_cli"
|
||||||
version = "0.1.3"
|
version = "2.3.dev1"
|
||||||
description = "OnionShare lets you securely and anonymously send and receive files. It works by starting a web server, making it accessible as a Tor onion service, and generating an unguessable web address so others can download files from you, or upload files to you. It does _not_ require setting up a separate server or using a third party file-sharing service."
|
description = "OnionShare lets you securely and anonymously send and receive files. It works by starting a web server, making it accessible as a Tor onion service, and generating an unguessable web address so others can download files from you, or upload files to you. It does _not_ require setting up a separate server or using a third party file-sharing service."
|
||||||
authors = ["Micah Lee <micah@micahflee.com>"]
|
authors = ["Micah Lee <micah@micahflee.com>"]
|
||||||
license = "GPLv3+"
|
license = "GPLv3+"
|
||||||
|
|
|
@ -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
|
xvfb-run ./tests/run.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Making a release
|
## 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
|
||||||
|
```
|
|
@ -13,6 +13,7 @@ description = "OnionShare lets you securely and anonymously send and receive fil
|
||||||
icon = "src/onionshare/resources/onionshare"
|
icon = "src/onionshare/resources/onionshare"
|
||||||
sources = ['src/onionshare']
|
sources = ['src/onionshare']
|
||||||
requires = [
|
requires = [
|
||||||
|
"./onionshare_cli-2.3.dev1-py3-none-any.whl",
|
||||||
"Click",
|
"Click",
|
||||||
"eventlet",
|
"eventlet",
|
||||||
"Flask",
|
"Flask",
|
||||||
|
|
|
@ -29,17 +29,6 @@ import psutil
|
||||||
import getpass
|
import getpass
|
||||||
from PySide2 import QtCore, QtWidgets
|
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 onionshare_cli.common import Common
|
||||||
|
|
||||||
from .gui_common import GuiCommon
|
from .gui_common import GuiCommon
|
||||||
|
|
Loading…
Reference in a new issue