gphoto2-cffi made optional as a dependency, included optional dependencies in installation instructions

This commit is contained in:
Balthasar Reuter
2018-07-17 22:03:58 +02:00
parent 94bcf92f2e
commit 308d429ed4
2 changed files with 17 additions and 3 deletions

View File

@@ -56,6 +56,10 @@ In a terminal, enter the following commands
sudo apt install python3-dev python3-pip virtualenv
sudo apt install qt5-default pyqt5-dev pyqt5-dev-tools # for PyQt5-GUI
sudo apt install gphoto2 libgphoto2-dev # to use gphoto2
```
If you want to use the gphoto2-cffi bindings you have to install the following packages:
```bash
sudo apt install libffi6 libffi-dev # for gphoto2-cffi bindings
```
@@ -110,6 +114,17 @@ Run the following command to download and install all dependencies and the photo
pip install -e .
```
Some dependencies are optional and must be included explicitly if you plan on using them.
For that, change the above command to (note the lack of a whitespace after the dot)
```bash
pip install -e .[extras]
```
and replace `extras` by a comma separated list (without whitespaces!) of the desired options.
These include:
- `pyqt` if you want to install PyQt5 from PIP (doesn't work on Raspbian)
- `picamera` if you want to use the Raspberry Pi camera module
- `gphoto2-cffi` if you want to use the `gphoto2-cffi` bindings
## Run Photobooth
If not yet done, activate your virtual environment
```bash

View File

@@ -162,7 +162,6 @@ setup(
'Pillow',
'gpiozero',
'gphoto2',
'gphoto2-cffi', # Optional
],
# List additional groups of dependencies here (e.g. development
@@ -174,9 +173,9 @@ setup(
# Similar to `install_requires` above, these must be valid existing
# projects.
extras_require={ # Optional
'dev': ['PyQt5'],
'pyqt': ['PyQt5'],
'picamera': ['picamera'],
# 'test': ['coverage'],
'gphoto2-cffi': ['gphoto2-cffi'],
},
python_requires='>=3.5',