fix(travis): install virtualenv automatically

The only dependency we really have is python, and wget.
Pip is not needed !
This commit is contained in:
Sebastian Thiel
2015-03-14 12:45:32 +01:00
parent dd0772f1d7
commit 5fd7cb5114
3 changed files with 9 additions and 40 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
.timestamp
.pyenv
.virtualenv
gen/
*.go
*.pyc

View File

@@ -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)

View File

@@ -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