Assure that setuptools <45 is installed

In some circumstances pip pulls setuptools 45.0.0, which is not compatible with Python 2. To assure the correct version is installed, add the "--no-setuptools" flag to virtualenv and install the correct setuptools version manually afterwards.

Workaround for: https://github.com/mozilla-services/syncserver/issues/239

Additionally this removes the obsolete pip upgrade. "make build" only runs once and is blocked afterwards by a flag file. Even when removing this flag file manually, "virtualenv" always reinstalls pip, which includes an upgrade to the latest version. A latest supported pip version is hence assured on every build.

Signed-off-by: MichaIng <micha@dietpi.com>
pull/245/head
MichaIng 4 years ago
parent 1b140a8a6e
commit 196b926da3

@ -24,8 +24,10 @@ all: build
.PHONY: build
build: | $(ENV)/COMPLETE
$(ENV)/COMPLETE: requirements.txt
$(VIRTUALENV) $(ENV)
$(INSTALL) -i https://pypi.python.org/simple -U pip
# Install the latest Python 2 compatible setuptools manually:
# https://github.com/mozilla-services/syncserver/issues/239
$(VIRTUALENV) $(ENV) --no-setuptools
$(INSTALL) -U "setuptools<45"
$(INSTALL) -r requirements.txt
$(ENV)/bin/python ./setup.py develop
touch $(ENV)/COMPLETE
@ -36,7 +38,7 @@ test: | $(TOOLS)
$(ENV)/bin/nosetests -s syncstorage.tests
# Tokenserver tests currently broken due to incorrect file paths
# $(ENV)/bin/nosetests -s tokenserver.tests
# Test against a running server.
$(ENV)/bin/gunicorn --paste syncserver/tests.ini 2> /dev/null & SERVER_PID=$$!; \
sleep 2; \

Loading…
Cancel
Save