Include the Python package installation & tests in the extension Makefil

This commit is contained in:
Javier Goizueta 2016-02-19 10:48:50 +01:00
parent c603c487c9
commit 845d56a091
3 changed files with 23 additions and 12 deletions

View File

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

View File

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

View File

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