From 845d56a0912ad9058fe8c9954d8d0f88e7da26bb Mon Sep 17 00:00:00 2001 From: Javier Goizueta Date: Fri, 19 Feb 2016 10:48:50 +0100 Subject: [PATCH] Include the Python package installation & tests in the extension Makefil --- CONTRIBUTING.md | 13 +++++-------- DEPLOYING.md | 10 ++++++---- pg/Makefile | 12 ++++++++++++ 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ebf2155..2bf5073 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,18 +65,15 @@ the extension) with `_cdb_`. ## Testing -Running the Python tests: +Running just the Python tests: ``` -cd python/crankdown -nosetests test +(cd python/crankdown && nosetests test) ``` -Installing the Python package and running the PostgreSQL tests: +Installing the Extension & Python package and running +the Python & PostgreSQL tests: ``` -sudo pip install python/crankdown --upgrade -cd pg -sudo make install -PGUSER=postgres make installcheck +(cd pg && sudo make install && PGUSER=postgres make installcheck) ``` diff --git a/DEPLOYING.md b/DEPLOYING.md index 13bc001..c5026b2 100644 --- a/DEPLOYING.md +++ b/DEPLOYING.md @@ -9,13 +9,15 @@ Deployment to db servers ``` -# Install python module -sudo pip install python/crankshaft --upgrade - -# Install extension (cd pg && sudo PGUSER=postgres make all install) ``` +Installing only the Python package: + +``` +sudo pip install python/crankshaft --upgrade +``` + Caveat: note that `pip install ./crankshaft` will install from local files, but `pip install crankshaft` will not. diff --git a/pg/Makefile b/pg/Makefile index 34de170..eff62f0 100644 --- a/pg/Makefile +++ b/pg/Makefile @@ -28,3 +28,15 @@ REGRESS_OPTS = --inputdir='$(TEST_DIR)' --outputdir='$(TEST_DIR)' PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) + +# Install the Python package +install_py_package: + pip install ../python/crankshaft --upgrade + +install: install_py_package + +# Run the Python tests +test_py_package: + (cd ../python/crankshaft && nosetests test) + +installcheck: test_py_package