diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000000..423f93f7ec963 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.7 + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + libudev-dev libavformat-dev libavcodec-dev libavdevice-dev \ + libavutil-dev libswscale-dev libswresample-dev libavfilter-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /workspace + +# Install Python dependencies from requirements.txt if it exists +COPY requirements_test_all.txt homeassistant/package_constraints.txt /workspace/ +RUN pip3 install -r requirements_test_all.txt -c package_constraints.txt + +# Set the default shell to bash instead of sh +ENV SHELL /bin/bash diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000000..4bc64937a620b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,15 @@ +// See https://aka.ms/vscode-remote/devcontainer.json for format details. +{ + "name": "Home Assistant Dev", + "context": "..", + "dockerFile": "Dockerfile", + "postCreateCommand": "pip3 install -e .", + "extensions": [ + "ms-python.python" + ], + "settings": { + "python.pythonPath": "/usr/local/bin/python", + "python.linting.pylintEnabled": true, + "python.linting.enabled": true + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 397a584c28eab..7a0cb29bc2b26 100644 --- a/.gitignore +++ b/.gitignore @@ -95,7 +95,6 @@ virtualization/vagrant/config # Visual Studio Code .vscode -.devcontainer # Built docs docs/build