diff options
author | Yu-Jie Lin <livibetter@gmail.com> | 2013-08-14 19:42:14 +0800 |
---|---|---|
committer | Yu-Jie Lin <livibetter@gmail.com> | 2013-08-14 19:42:14 +0800 |
commit | 7c2d3f39a5127ca42bebab032cf3f64e7aa775bc (patch) | |
tree | cff9d69bd3af5b8b937c30addc11f88666e3e341 | |
parent | c10be0f34175823a7c20155f11639a6773f9e24f (diff) | |
download | smartypants-7c2d3f39a5127ca42bebab032cf3f64e7aa775bc.tar.gz |
add install_test target for checking package installation
-rw-r--r-- | CHANGES.rst | 1 | ||||
-rw-r--r-- | Makefile | 21 |
2 files changed, 21 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 934fdd0..988b268 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,7 @@ Versions without timestamps mean they are future releases. development: - add ``--version`` + - add ``install_test`` target for checking package installation 1.7.1: 2013-08-14T06:45:59Z - fix README-PyPI.rst missing while installing @@ -1,3 +1,13 @@ +PACKAGE=smartypants +SCRIPT=smartypants + +INSTALL_TEST_DIR=/tmp/$(PACKAGE)_install_test +# if version or naming isn't matched to environment, for example, Python 2.6, +# run the following to override: +# make VENV_PY2_CMD=virtualenv-python2.6 install_test +VENV_PY2_CMD=virtualenv-python2.7 +VENV_PY3_CMD=virtualenv-python3.2 + BUILD_CMD=./setup.py sdist --formats gztar,zip bdist_wininst --plat-name win32 build: @@ -6,4 +16,13 @@ build: upload: $(BUILD_CMD) upload -.PHONY: build upload +install_test: $(VENV_PY2_CMD) $(VENV_PY3_CMD) + +$(VENV_PY2_CMD) $(VENV_PY3_CMD): + rm -rf $(INSTALL_TEST_DIR) + $@ $(INSTALL_TEST_DIR) + ./setup.py sdist --dist-dir $(INSTALL_TEST_DIR) + $(INSTALL_TEST_DIR)/bin/pip install $(INSTALL_TEST_DIR)/*.tar.gz + . $(INSTALL_TEST_DIR)/bin/activate ; $(SCRIPT) --version ; type $(SCRIPT) + +.PHONY: build upload install_test $(VENV_PY2_CMD) $(VENV_PY3_CMD) |