From bd2b1906431aa9021fe37223345166fe3a3c34d6 Mon Sep 17 00:00:00 2001 From: Raul Marin Date: Tue, 31 Oct 2017 09:58:43 +0100 Subject: [PATCH] Add PIP and NOSETESTS as variables to Makefile.global This makes it easier to change between pip/pip2 depending on the local environment --- Makefile.global | 2 ++ src/py/Makefile | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile.global b/Makefile.global index da85992..140d486 100644 --- a/Makefile.global +++ b/Makefile.global @@ -4,3 +4,5 @@ PACKAGE = crankshaft EXTVERSION = $(shell grep default_version $(SELF_DIR)/src/pg/$(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/") RELEASE_VERSION ?= $(EXTVERSION) SED = sed +PIP = pip +NOSETESTS = nosetests diff --git a/src/py/Makefile b/src/py/Makefile index cc3c67e..cc22ed8 100644 --- a/src/py/Makefile +++ b/src/py/Makefile @@ -2,11 +2,11 @@ include ../../Makefile.global # Install the package locally for development install: - pip install --upgrade ./crankshaft + $(PIP) install --upgrade ./crankshaft # Test develpment install test: - nosetests crankshaft/test/ + $(NOSETESTS) crankshaft/test/ release: ../../release/$(EXTENSION).control $(SOURCES_DATA) mkdir -p ../../release/python/$(EXTVERSION) @@ -14,4 +14,4 @@ release: ../../release/$(EXTENSION).control $(SOURCES_DATA) $(SED) -i -r 's/version='"'"'[0-9]+\.[0-9]+\.[0-9]+'"'"'/version='"'"'$(EXTVERSION)'"'"'/g' ../../release/python/$(EXTVERSION)/$(PACKAGE)/setup.py deploy: - pip install $(RUN_OPTIONS) --upgrade ../../release/python/$(RELEASE_VERSION)/$(PACKAGE) + $(PIP) install $(RUN_OPTIONS) --upgrade ../../release/python/$(RELEASE_VERSION)/$(PACKAGE)