From 53dbda8128f708f255e461bd32a93ab19ebee5da Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Wed, 25 Jan 2017 14:42:42 -0500 Subject: [PATCH] Upgrade pip and setuptools before use Workaround for https://github.com/pypa/setuptools/issues/945 --- {{cookiecutter.project_name}}/Makefile | 27 +++++++++----------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/{{cookiecutter.project_name}}/Makefile b/{{cookiecutter.project_name}}/Makefile index 30946e7..b72a4de 100644 --- a/{{cookiecutter.project_name}}/Makefile +++ b/{{cookiecutter.project_name}}/Makefile @@ -91,19 +91,20 @@ doctor: ## Confirm system dependencies are available # PROJECT DEPENDENCIES ######################################################### -DEPS_CI := $(ENV)/.install-ci -DEPS_DEV := $(ENV)/.install-dev -DEPS_BASE := $(ENV)/.install-base +DEPENDENCIES := $(ENV)/.dependencies-flag +DEV_DEPENDENCIES := $(ENV)/.dev-dependencies-flag .PHONY: install -install: $(DEPS_CI) $(DEPS_DEV) $(DEPS_BASE) ## Install all project dependencies +install: $(DEPENDENCIES) $(DEV_DEPENDENCIES) ## Install all project dependencies -$(DEPS_CI): requirements/ci.txt $(PIP) - $(PIP) install --upgrade -r $< +$(DEPENDENCIES): setup.py requirements.txt $(PYTHON) + $(PYTHON) setup.py develop @ touch $@ # flag to indicate dependencies are installed -$(DEPS_DEV): requirements/dev.txt $(PIP) - $(PIP) install --upgrade -r $< +$(DEV_DEPENDENCIES): requirements/*.txt $(PIP) + $(PIP) install --upgrade pip setuptools + $(PIP) install --upgrade -r requirements/ci.txt + $(PIP) install --upgrade -r requirements/dev.txt ifdef WINDOWS @ echo "Manually install pywin32: https://sourceforge.net/projects/pywin32/files/pywin32" else ifdef MAC @@ -113,20 +114,10 @@ else ifdef LINUX endif @ touch $@ # flag to indicate dependencies are installed -$(DEPS_BASE): setup.py requirements.txt $(PYTHON) - $(PYTHON) setup.py develop - @ touch $@ # flag to indicate dependencies are installed - $(PIP): $(PYTHON) - $(PYTHON) -m pip install --upgrade pip setuptools - @ touch $@ $(PYTHON): -{%- if cookiecutter.python_major_version == "3" and cookiecutter.python_minor_version >= "3" %} - $(SYS_PYTHON) -m venv --clear $(ENV) -{%- else %} $(SYS_VIRTUALENV) --python $(SYS_PYTHON) $(ENV) -{%- endif %} # CHECKS #######################################################################