diff --git a/.gitignore b/.gitignore index 83aa6a97eb..ce179b055b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .timestamp .pyenv +.virtualenv gen/ *.go *.pyc diff --git a/Makefile b/Makefile index d5eb4356bc..306f140864 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 9649a608aa..0000000000 --- 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