Skip to content

Commit

Permalink
Updated dependency requirements, added install script (and an angry r…
Browse files Browse the repository at this point in the history
…ant)
  • Loading branch information
MadMartian committed Feb 16, 2021
1 parent 68ee87c commit f24b024
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ A configurable Python daemon that dictates system notification messages audibly

## Prerequisites
1. Festival speech engine
2. Python 3.5
3. All other dependencies are recorded in `requirements.txt`. To install run `pip -r requirements.txt` from the repository root.
2. Python 3.6
3. Pip
4. VirtualEnv
5. All other dependencies are recorded in `requirements.txt`. To install run `pip -r requirements.txt` from the repository root.

# Install
There is an install script that has been tested on Ubuntu 20.04 (Focal). For other distributions I'm afraid you're on your own.

## Rant
I wasn't prepared for the absolute dependency hell that Python has become and I am still shocked that a custom install script is necessary for something so simple. This is my first (and last) Python project I will invest time in. Nobody has time for playing endless games of depedency whack-a-mole.

# Configuration
To configure this daemon see the sample configuration file enclosed in this repository. Place the configuration file at `/etc/b9robot/mappings.yaml` even if that means moving and renaming the bundled `mappings.example.yaml`. You can edit this configuration and send the _hang-up_ (`HUP`) signal to b9robot to automatically reload the configuration upon receipt of the next notification.
Expand Down
2 changes: 1 addition & 1 deletion b9robot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python3.5
#!/usr/bin/env python

import gi

Expand Down
14 changes: 14 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh -e

sudo apt -y install libsm6 libxrender1 libfontconfig1 python3.6-dev
cd `dirname $0`
virtualenv --python `which python3.6` .
. bin/activate
wget https://files.pythonhosted.org/packages/56/bb/905529e614a391170089578b0f4ec763a9f90d625f3996560ac57baae752/pyfestival-0.5.tar.gz -O pyfestival.tar.gz
tar zxf pyfestival.tar.gz
cd pyfestival-*
./setup.py install
cd ..
rm -fR pyfestival-* pyfestival.tar.gz
pip install -r requirements.txt
sed -i -e '1iimport _festival' -e '1,6{/^try:$/,/^[[:space:]]*import _festival/{d}}' lib/python3.6/site-packages/festival.py
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ beautifulsoup4 == 4.9.3
lxml == 4.6.2
cronyo == 0.4.2
dbus-python == 1.2.16
opencv_python == 4.4.0.42
opencv-python-headless == 4.4.0.42
pyfestival == 0.5
pygobject == 3.38.0
xlib == 0.21
Expand Down

0 comments on commit f24b024

Please sign in to comment.