mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Switch from termcolor to colorama
This commit is contained in:
parent
429f5dcf43
commit
46c73329a5
4 changed files with 14 additions and 7 deletions
13
BUILD.md
13
BUILD.md
|
@ -5,7 +5,7 @@
|
|||
Install dependencies:
|
||||
|
||||
```sh
|
||||
sudo apt install -y dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-termcolor
|
||||
sudo apt install -y dh-python python3 python3-stdeb python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtwidgets python3-appdirs python3-click python3-xdg python3-requests python3-colorama
|
||||
```
|
||||
|
||||
You also need docker, either by installing the [Docker snap package](https://snapcraft.io/docker), installing the `docker.io` package, or by installing `docker-ce` by following [these instructions for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/) or [for Debian](https://docs.docker.com/install/linux/docker-ce/debian/).
|
||||
|
@ -27,7 +27,7 @@ Create a .deb:
|
|||
Install dependencies:
|
||||
|
||||
```sh
|
||||
sudo dnf install -y rpm-build python3 python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-termcolor
|
||||
sudo dnf install -y rpm-build python3 python3-pyside2 python3-appdirs python3-click python3-pyxdg python3-requests python3-colorama
|
||||
```
|
||||
|
||||
You also need docker, either by installing the `docker` package, or by installing `docker-ce` by following [these instructions](https://docs.docker.com/install/linux/docker-ce/fedora/).
|
||||
|
@ -61,7 +61,14 @@ poetry install
|
|||
Run from source tree:
|
||||
|
||||
```
|
||||
poetry run dangerzone
|
||||
# start a shell in the virtual environment
|
||||
poetry shell
|
||||
|
||||
# run the CLI
|
||||
./dev_scripts/dangerzone-cli --help
|
||||
|
||||
# run the GUI
|
||||
./dev_scripts/dangerzone
|
||||
```
|
||||
|
||||
To create an app bundle, use the `build_app.py` script:
|
||||
|
|
|
@ -4,7 +4,7 @@ import os
|
|||
import pipes
|
||||
import platform
|
||||
from PySide2 import QtCore, QtWidgets, QtGui
|
||||
from termcolor import cprint
|
||||
from colorama import Style
|
||||
|
||||
|
||||
class TaskBase(QtCore.QThread):
|
||||
|
@ -27,7 +27,7 @@ class TaskBase(QtCore.QThread):
|
|||
self.update_details.emit(output)
|
||||
|
||||
stderr = p.stderr.read().decode()
|
||||
cprint(stderr, attrs=["dark"])
|
||||
print(Style.DIM + stderr + Style.RESET_ALL)
|
||||
self.update_details.emit(output)
|
||||
|
||||
if p.returncode == 126 or p.returncode == 127:
|
||||
|
|
|
@ -31,7 +31,7 @@ def main():
|
|||
|
||||
print("* Building RPM package")
|
||||
subprocess.run(
|
||||
"python3 setup.py bdist_rpm --requires='python3-pyside2,python3-appdirs,python3-click,python3-pyxdg,python3-requests,python3-termcolor,(docker or docker-ce)'",
|
||||
"python3 setup.py bdist_rpm --requires='python3-pyside2,python3-appdirs,python3-click,python3-pyxdg,python3-requests,python3-colorama,(docker or docker-ce)'",
|
||||
shell=True,
|
||||
cwd=root,
|
||||
check=True,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[DEFAULT]
|
||||
Package3: dangerzone
|
||||
Depends3: python3, python3-pyside2.qtcore, python3-pyside2.qtgui, python3-pyside2.qtwidgets, python3-appdirs, python3-click, python3-xdg, python3-requests, python3-termcolor
|
||||
Depends3: python3, python3-pyside2.qtcore, python3-pyside2.qtgui, python3-pyside2.qtwidgets, python3-appdirs, python3-click, python3-xdg, python3-requests, python3-colorama
|
||||
Build-Depends: dh-python, python3, python3-all
|
||||
Suite: bionic
|
||||
X-Python3-Version: >= 3.6
|
Loading…
Reference in a new issue