Add a top-level Makefile
So we have single entry points to install/check everything
This commit is contained in:
parent
fe167efca5
commit
1ce0a206c7
@ -68,12 +68,17 @@ the extension) with `_cdb_`.
|
||||
Running just the Python tests:
|
||||
|
||||
```
|
||||
(cd python/crankdown && nosetests test)
|
||||
(cd python && make test)
|
||||
```
|
||||
|
||||
Installing the Extension & Python package and running
|
||||
the Python & PostgreSQL tests:
|
||||
Installing the Extension and running just the PostgreSQL tests:
|
||||
|
||||
```
|
||||
(cd pg && sudo make install && PGUSER=postgres make installcheck)
|
||||
```
|
||||
|
||||
Installing and testing everything:
|
||||
|
||||
```
|
||||
sudo make install && PGUSER=postgres make testinstalled
|
||||
```
|
||||
|
25
DEPLOYING.md
25
DEPLOYING.md
@ -6,10 +6,11 @@
|
||||
|
||||
...
|
||||
|
||||
Deployment to db servers
|
||||
Deployment to db servers: the next command will install both the Python
|
||||
package and the extension.
|
||||
|
||||
```
|
||||
(cd pg && sudo PGUSER=postgres make all install)
|
||||
sudo make install
|
||||
```
|
||||
|
||||
Installing only the Python package:
|
||||
@ -21,6 +22,22 @@ sudo pip install python/crankshaft --upgrade
|
||||
Caveat: note that `pip install ./crankshaft` will install
|
||||
from local files, but `pip install crankshaft` will not.
|
||||
|
||||
Installing the extension in user databases:
|
||||
CI: Install and run the tests on the installed extension and package:
|
||||
|
||||
...
|
||||
```
|
||||
(sudo make install && PGUSER=postgres make testinstalled)
|
||||
```
|
||||
|
||||
Installing the extension in user databases:
|
||||
Once installed in a server, the extension can be added
|
||||
to a database with the next SQL command:
|
||||
|
||||
```
|
||||
CREATE EXTENSION crankshaft;
|
||||
```
|
||||
|
||||
To upgrade the extension to an specific version X.Y.Z:
|
||||
|
||||
```
|
||||
ALTER EXTENSION crankshaft UPGRADE TO 'X.Y.Z';
|
||||
```
|
||||
|
13
Makefile
Normal file
13
Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
EXT_DIR = pg
|
||||
PYP_DIR = python
|
||||
|
||||
.PHONY: install
|
||||
.PHONY: run_tests
|
||||
|
||||
install:
|
||||
$(MAKE) -C $(PYP_DIR) install
|
||||
$(MAKE) -C $(EXT_DIR) install
|
||||
|
||||
testinstalled:
|
||||
$(MAKE) -C $(PYP_DIR) testinstalled
|
||||
$(MAKE) -C $(EXT_DIR) installcheck
|
12
pg/Makefile
12
pg/Makefile
@ -28,15 +28,3 @@ 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
|
||||
|
11
python/Makefile
Normal file
11
python/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# Install the package (needs root privileges)
|
||||
install:
|
||||
pip install ./crankshaft --upgrade
|
||||
|
||||
# Test from source code
|
||||
test:
|
||||
(cd crankshaft && nosetests test/)
|
||||
|
||||
# Test currently installed package
|
||||
testinstalled:
|
||||
nosetests crankshaft/test/
|
Loading…
Reference in New Issue
Block a user