mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-12-01 03:04:14 +01:00
commit
4803376b6c
6 changed files with 33 additions and 22 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -22,7 +22,7 @@ jobs:
|
||||||
- name: Setup python environment
|
- name: Setup python environment
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.9'
|
||||||
|
|
||||||
- name: Clean
|
- name: Clean
|
||||||
run: python setup.py clean --all
|
run: python setup.py clean --all
|
||||||
|
|
|
@ -3,7 +3,7 @@ RUN apk --no-cache add curl && mkdir /downloads
|
||||||
# Download installation files
|
# Download installation files
|
||||||
RUN curl https://github.com/avollkopf/craftbeerpi4-ui/archive/main.zip -L -o ./downloads/cbpi-ui.zip
|
RUN curl https://github.com/avollkopf/craftbeerpi4-ui/archive/main.zip -L -o ./downloads/cbpi-ui.zip
|
||||||
|
|
||||||
FROM python:3.7 as base
|
FROM python:3.9 as base
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
|
@ -39,7 +39,7 @@ RUN pip3 install --no-cache-dir -r /cbpi-src/requirements.txt
|
||||||
# Install RPi.GPIO separately because it's excluded in setup.py for non-raspberrys.
|
# Install RPi.GPIO separately because it's excluded in setup.py for non-raspberrys.
|
||||||
# This can enable GPIO support for the image when used on a raspberry pi and the
|
# This can enable GPIO support for the image when used on a raspberry pi and the
|
||||||
# /dev/gpiomem device.
|
# /dev/gpiomem device.
|
||||||
RUN pip3 install --no-cache-dir RPi.GPIO==0.7.1a4
|
RUN pip3 install --no-cache-dir RPi.GPIO==0.7.1
|
||||||
|
|
||||||
FROM base as deploy
|
FROM base as deploy
|
||||||
# Install craftbeerpi from source
|
# Install craftbeerpi from source
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = "4.0.1.14"
|
__version__ = "4.0.1.16"
|
||||||
|
|
11
cbpi/cli.py
11
cbpi/cli.py
|
@ -218,7 +218,18 @@ def plugins_add(package_name):
|
||||||
return
|
return
|
||||||
return
|
return
|
||||||
|
|
||||||
|
installation = True
|
||||||
try:
|
try:
|
||||||
|
try:
|
||||||
|
p_metadata= metadata(package_name)
|
||||||
|
p_name=p_metadata['Name']
|
||||||
|
if p_name != package_name:
|
||||||
|
print("Error. Package name {} does not exist. Did you mean {}".format(package_name,p_name))
|
||||||
|
installation = False
|
||||||
|
except Exception as e:
|
||||||
|
print("Error. Package {} cannot be found in installed packages".format(package_name))
|
||||||
|
installation = False
|
||||||
|
if installation:
|
||||||
with open(os.path.join(".", 'config', "config.yaml"), 'rt') as f:
|
with open(os.path.join(".", 'config', "config.yaml"), 'rt') as f:
|
||||||
data = yaml.load(f, Loader=yaml.FullLoader)
|
data = yaml.load(f, Loader=yaml.FullLoader)
|
||||||
if package_name in data["plugins"]:
|
if package_name in data["plugins"]:
|
||||||
|
|
|
@ -10,10 +10,10 @@ cryptography==3.3.2
|
||||||
requests==2.25.1
|
requests==2.25.1
|
||||||
voluptuous==0.12.1
|
voluptuous==0.12.1
|
||||||
pyfiglet==0.8.post1
|
pyfiglet==0.8.post1
|
||||||
pandas==1.1.5
|
pandas==1.4.0
|
||||||
shortuuid==1.0.1
|
shortuuid==1.0.1
|
||||||
tabulate==0.8.7
|
tabulate==0.8.7
|
||||||
numpy==1.20.3
|
numpy==1.22.0
|
||||||
cbpi4ui
|
cbpi4ui
|
||||||
click==7.1.2
|
click==7.1.2
|
||||||
importlib_metadata==4.8.2
|
importlib_metadata==4.8.2
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -49,7 +49,7 @@ setup(name='cbpi',
|
||||||
'psutil==5.8.0',
|
'psutil==5.8.0',
|
||||||
'cbpi4ui',
|
'cbpi4ui',
|
||||||
'importlib_metadata'] + (
|
'importlib_metadata'] + (
|
||||||
['RPi.GPIO==0.7.1a4'] if raspberrypi else [] ) +
|
['RPi.GPIO==0.7.1'] if raspberrypi else [] ) +
|
||||||
(['numpy==1.22.0'] if (int(platform.python_version_tuple()[1]) >= 9) and (int(platform.python_version_tuple()[0]) == 3) else ['numpy==1.20.3'] ) +
|
(['numpy==1.22.0'] if (int(platform.python_version_tuple()[1]) >= 9) and (int(platform.python_version_tuple()[0]) == 3) else ['numpy==1.20.3'] ) +
|
||||||
(['pandas==1.4.0'] if (int(platform.python_version_tuple()[1]) >= 9) and (int(platform.python_version_tuple()[0]) == 3) else ['pandas==1.1.5'] ),
|
(['pandas==1.4.0'] if (int(platform.python_version_tuple()[1]) >= 9) and (int(platform.python_version_tuple()[0]) == 3) else ['pandas==1.1.5'] ),
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue