From 5fd7cb511407de7176dc07c1443ef07075c063a4 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sat, 14 Mar 2015 12:45:32 +0100 Subject: [PATCH] fix(travis): install virtualenv automatically The only dependency we really have is python, and wget. Pip is not needed ! --- .gitignore | 1 + Makefile | 13 ++++++++----- Makefile.helpers | 35 ----------------------------------- 3 files changed, 9 insertions(+), 40 deletions(-) delete mode 100644 Makefile.helpers diff --git a/.gitignore b/.gitignore index 83aa6a97eb9..ce179b055b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .timestamp .pyenv +.virtualenv gen/ *.go *.pyc diff --git a/Makefile b/Makefile index d5eb4356bcd..306f140864e 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,7 @@ .PHONY: json-to-xml clean help api-deps regen-apis license .SUFFIXES: -include Makefile.helpers - -VENV := virtualenv +VENV = .virtualenv/virtualenv.py VENV_DIR := .pyenv PYTHON := $(VENV_DIR)/bin/python PIP := $(VENV_DIR)/bin/pip @@ -44,8 +42,13 @@ help: $(info update-json - rediscover API schema json files and update api-list.yaml with latest versions) $(info api-deps - generate a file to tell make what API file dependencies will be) -$(PYTHON): - virtualenv $(VENV_DIR) +$(VENV): + wget -nv https://pypi.python.org/packages/source/v/virtualenv/virtualenv-12.0.7.tar.gz -O virtualenv-12.0.7.tar.gz + tar -xzf virtualenv-12.0.7.tar.gz && mv virtualenv-12.0.7 ./.virtualenv && rm -f virtualenv-12.0.7.tar.gz + chmod +x $@ + +$(PYTHON): $(VENV) + $(VENV) $(VENV_DIR) $(PIP) install mako pyyaml $(MAKO_RENDER): $(PYTHON) diff --git a/Makefile.helpers b/Makefile.helpers deleted file mode 100644 index 9649a608aa3..00000000000 --- a/Makefile.helpers +++ /dev/null @@ -1,35 +0,0 @@ -OS := $(shell uname) -ifeq ($(OS), "") - OS = Windows -endif - -ARCH := - -# based on http://stackoverflow.com/questions/714100/os-detecting-makefile -ifeq ($(OS),Windows) - ARCH = WIN32 - ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) - ARCH = AMD64 - endif - ifeq ($(PROCESSOR_ARCHITECTURE),x86) - ARCH = IA32 - endif -else - UNAME_S := $(shell uname -s) - ifeq ($(UNAME_S),Linux) - OS = LINUX - endif - ifeq ($(UNAME_S),Darwin) - OS = OSX - endif - UNAME_M := $(shell uname -m) - ifeq ($(UNAME_M),x86_64) - ARCH = AMD64 - endif - ifneq ($(filter %86,$(UNAME_M)),) - ARCH = IA32 - endif - ifneq ($(filter arm%,$(UNAME_M)),) - ARCH = ARM - endif -endif \ No newline at end of file