mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-29 01:18:51 -04:00
Change how poetry is installed in snapcraft, and update release docs
This commit is contained in:
parent
a616bff7e9
commit
e040196dbc
2 changed files with 10 additions and 11 deletions
18
RELEASE.md
18
RELEASE.md
|
@ -201,13 +201,12 @@ After there's a new release tag, make the Flathub package work here: https://git
|
||||||
You must have `flatpak` and `flatpak-builder` installed, with flathub remote added (`flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo`).
|
You must have `flatpak` and `flatpak-builder` installed, with flathub remote added (`flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo`).
|
||||||
|
|
||||||
- [ ] Change the tag (for both `onionshare` and `onionshare-cli`) to match the new git tag
|
- [ ] Change the tag (for both `onionshare` and `onionshare-cli`) to match the new git tag
|
||||||
- [ ] Update `tor`, `libevent`, and `obfs4` dependencies, if necessary
|
- [ ] Update `tor`, `libevent`, `obfs4`, `meek-client`, and `snowflake-client` dependencies, if necessary
|
||||||
- [ ] Built the latest python dependencies using [this tool](https://github.com/flatpak/flatpak-builder-tools/blob/master/pip/flatpak-pip-generator) (see below)
|
- [ ] Built the latest python dependencies using [this tool](https://github.com/flatpak/flatpak-builder-tools/blob/master/pip/flatpak-pip-generator) (see below)
|
||||||
- [ ] Test the Flatpak package, ensure it works
|
- [ ] Test the Flatpak package, ensure it works
|
||||||
|
|
||||||
```
|
```
|
||||||
# you may need to install toml
|
pip3 install toml requirements-parser
|
||||||
pip3 install --user toml
|
|
||||||
|
|
||||||
# clone flatpak-build-tools
|
# clone flatpak-build-tools
|
||||||
git clone https://github.com/flatpak/flatpak-builder-tools.git
|
git clone https://github.com/flatpak/flatpak-builder-tools.git
|
||||||
|
@ -219,15 +218,16 @@ cd ..
|
||||||
|
|
||||||
# get onionshare dependencies
|
# get onionshare dependencies
|
||||||
cd pip
|
cd pip
|
||||||
./flatpak-pip-generator $(python3 -c 'import toml; print("\n".join(toml.loads(open("../../onionshare/desktop/pyproject.toml").read())["tool"]["briefcase"]["app"]["onionshare"]["requires"]))' |grep -v "./onionshare_cli" |grep -v -i "pyside2" |tr "\n" " ")
|
./flatpak-pip-generator $(python3 -c 'import toml; print("\n".join(toml.loads(open("../../onionshare/desktop/pyproject.toml").read())["tool"]["poetry"]["dependencies"]))' |grep -vi onionshare_cli |grep -vi python | grep -vi pyside2 | grep -vi cx_freeze |tr "\n" " ")
|
||||||
mv python3-modules.json onionshare.json
|
cd ..
|
||||||
|
|
||||||
# use something like https://www.json2yaml.com/ to convert to yaml and update the manifest
|
# convert to yaml
|
||||||
# add all of the modules in both onionshare-cli and onionshare to the submodules of "onionshare"
|
./flatpak-json2yaml.py -o onionshare-cli.yml poetry/generated-poetry-sources.json
|
||||||
# - poetry/generated-poetry-sources.json (onionshare-cli)
|
./flatpak-json2yaml.py -o onionshare.yml pip/python3-qrcode.json
|
||||||
# - pip/python3-modules.json (onionshare)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Now, merge `onionshare-cli.yml` and `onionshare.yml` into the Flatpak config.
|
||||||
|
|
||||||
Build and test the Flatpak package before publishing:
|
Build and test the Flatpak package before publishing:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
|
@ -117,8 +117,6 @@ parts:
|
||||||
onionshare-cli:
|
onionshare-cli:
|
||||||
source: ./cli
|
source: ./cli
|
||||||
plugin: python
|
plugin: python
|
||||||
python-packages:
|
|
||||||
- poetry
|
|
||||||
stage-packages:
|
stage-packages:
|
||||||
- build-essential
|
- build-essential
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
|
@ -127,6 +125,7 @@ parts:
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- cargo
|
- cargo
|
||||||
override-build: |
|
override-build: |
|
||||||
|
python3 -m pip install poetry
|
||||||
poetry install
|
poetry install
|
||||||
poetry build
|
poetry build
|
||||||
python3 -m pip install ./dist/onionshare_cli-*.whl --prefix $SNAPCRAFT_PART_INSTALL
|
python3 -m pip install ./dist/onionshare_cli-*.whl --prefix $SNAPCRAFT_PART_INSTALL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue