From cb9d78971c8f3849b7df0cb7fa5ae8e9f23a1750 Mon Sep 17 00:00:00 2001 From: Matin Tamizi Date: Wed, 2 Oct 2019 08:00:57 -0500 Subject: [PATCH] fix issues created with docker --- Dockerfile | 4 ++-- Makefile | 22 ++++++++++------------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index e47b8778..855aa245 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,8 @@ MAINTAINER Cuenca # Install app ADD Makefile requirements.txt /speid/ WORKDIR /speid -RUN pip install -q --upgrade pip -RUN pip install --quiet gunicorn +RUN pip install -qU pip +RUN pip install -q gunicorn RUN make install # Add repo contents to image diff --git a/Makefile b/Makefile index 48ff3034..ef5c7dda 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,9 @@ SHELL := bash -PATH := ./venv/bin:${PATH} -DOCKER = docker-compose run --rm -PYTHON = python3.7 PROJECT = speid -isort = isort -rc -ac $(PROJECT) tests -black = black -S -l 79 --target-version py37 $(PROJECT) tests +PYTHON = python3.7 +DOCKER = docker-compose run --rm $(PROJECT) +ISORT = venv/bin/isort -rc -ac $(PROJECT) tests +BLACK = venv/bin/black -S -l 79 --target-version py37 $(PROJECT) tests @@ -16,17 +15,16 @@ install-dev: install venv: $(PYTHON) -m venv --prompt speid venv - source venv/bin/activate - pip install -qU pip + venv/bin/pip install -qU pip format: - $(isort) - $(black) + $(ISORT) + $(BLACK) lint: - flake8 $(PROJECT) tests setup.py - $(isort) --check-only - $(black) --check + venv/bin/flake8 $(PROJECT) tests setup.py + $(ISORT) --check-only + $(BLACK) --check clean-pyc: find . -name '__pycache__' -exec rm -r "{}" +