From a0fb91af29bf6e82efdf86409df2b9a9d0cbeefc Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 27 Jul 2018 16:34:47 +0200 Subject: [PATCH] Use requirements.txt (#607) * Create requirements.txt * Update setup.py * Update Dockerfile * Update Dockerfile * Update requirements.txt * Update requirements.txt * Update Dockerfile * Update tox.ini --- Dockerfile | 9 ++++----- requirements.txt | 13 +++++++++++++ setup.py | 15 +-------------- tox.ini | 1 + 4 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile index f62123fcd..6d3cd2521 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ FROM $BUILD_FROM ENV LANG C.UTF-8 # Setup base +COPY requirements.txt /usr/src/ RUN apk add --no-cache \ git \ socat \ @@ -14,11 +15,9 @@ RUN apk add --no-cache \ && apk add --no-cache --virtual .build-dependencies \ make \ g++ \ - && pip3 install --no-cache-dir \ - uvloop==0.11.0 \ - cchardet==2.1.1 \ - pycryptodome==3.6.4 \ - && apk del .build-dependencies + && pip3 install -r /usr/src/requirements.txt \ + && apk del .build-dependencies \ + && rm -f /usr/src/requirements.txt # Install HassIO COPY . /usr/src/hassio diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..a3104bcf7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +attr==0.3.1 +async_timeout==3.0.0 +aiohttp==3.3.2 +docker==3.4.0 +colorlog==3.1.2 +voluptuous==0.11.1 +gitpython==2.1.10 +pytz==2018.4 +pyudev==0.21.0 +pycryptodome==3.6.4 +cpe==1.2.1 +uvloop==0.11.0 +cchardet==2.1.1 diff --git a/setup.py b/setup.py index 8214c8a27..f3c44cd9d 100644 --- a/setup.py +++ b/setup.py @@ -38,18 +38,5 @@ setup( 'hassio.utils', 'hassio.snapshots' ], - include_package_data=True, - install_requires=[ - 'attr==0.3.1', - 'async_timeout==3.0.0', - 'aiohttp==3.3.2', - 'docker==3.4.0', - 'colorlog==3.1.2', - 'voluptuous==0.11.1', - 'gitpython==2.1.10', - 'pytz==2018.4', - 'pyudev==0.21.0', - 'pycryptodome==3.6.4', - "cpe==1.2.1" - ] + include_package_data=True ) diff --git a/tox.ini b/tox.ini index 734921741..e2aff7381 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ envlist = lint deps = flake8==3.5.0 pylint==2.0.0 + -r{toxinidir}/requirements.txt [testenv:lint] basepython = python3