diff --git a/Makefile b/Makefile index 733323f..8f20888 100644 --- a/Makefile +++ b/Makefile @@ -6,20 +6,23 @@ ENV := env DEPENDS := $(ENV)/.depends EGG_INFO := $(subst -,_,$(PROJECT)).egg-info -ifeq ($(OS),Windows_NT) - SYS_PYTHON := C:\\Python33\\python.exe - SYS_VIRTUALENV := C:\\Python33\\Scripts\\virtualenv.exe - BIN := $(ENV)/Scripts +PLATFORM := $(shell python -c 'import sys; print(sys.platform)') + +ifneq ($(findstring win32, $(PLATFORM)), ) + SYS_PYTHON := C:\\Python33\\python.exe + SYS_VIRTUALENV := C:\\Python33\\Scripts\\virtualenv.exe + BIN := $(ENV)/Scripts EXE := .exe OPEN := cmd /c start # https://bugs.launchpad.net/virtualenv/+bug/449537 export TCL_LIBRARY=C:\\Python33\\tcl\\tcl8.5 else - SYS_PYTHON := python3 - SYS_VIRTUALENV := virtualenv - BIN := $(ENV)/bin + SYS_PYTHON := python3 + SYS_VIRTUALENV := virtualenv + BIN := $(ENV)/bin OPEN := open endif + MAN := man SHARE := share @@ -50,7 +53,7 @@ $(PIP): .PHONY: depends depends: .virtualenv $(DEPENDS) Makefile $(DEPENDS): - $(PIP) install docutils pdoc pep8 pylint nose coverage wheel + $(PIP) install docutils pdoc pep8 pylint nose coverage wheel mock touch $(DEPENDS) # flag to indicate dependencies are installed # Documentation ############################################################## @@ -82,7 +85,7 @@ read: doc .PHONY: pep8 pep8: depends - $(PEP8) $(PACKAGE) --ignore=E501 + $(PEP8) $(PACKAGE) --ignore=E501 .PHONY: pylint pylint: depends @@ -112,7 +115,7 @@ tests: env depends clean: .clean-dist .clean-test .clean-doc .clean-build .PHONY: clean-all -clean-all: clean .clean-env +clean-all: clean .clean-env .PHONY: .clean-env .clean-env: @@ -143,7 +146,7 @@ dist: env depends check test tests doc $(PYTHON) setup.py sdist $(PYTHON) setup.py bdist_wheel $(MAKE) read - + .PHONY: upload upload: env depends doc $(PYTHON) setup.py register sdist upload