WIP: PG12 + Python3 compat

This commit is contained in:
Raúl Marín 2019-12-19 15:22:44 +01:00
parent c89805b56d
commit dfdbacfb30
7 changed files with 27 additions and 27 deletions

View File

@ -39,9 +39,7 @@ ALTER EXTENSION crankshaft UPDATE TO 'dev';
If the extension has not previously been installed in a database,
it can be installed directly with:
```sql
CREATE EXTENSION IF NOT EXISTS plpythonu;
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION crankshaft WITH VERSION 'dev';
CREATE EXTENSION crankshaft WITH VERSION 'dev' CASCADE;
```
Once the feature or bugfix is completed and all the tests are passing

View File

@ -23,7 +23,7 @@ test: ## Run the tests for the development version of the extension
$(MAKE) -C $(EXT_DIR) test
# Generate a new release into release
release: ## Generate a new release of the extension. Only for telease manager
release: ## Generate a new release of the extension.
$(MAKE) -C $(EXT_DIR) release
$(MAKE) -C $(PYP_DIR) release
@ -31,7 +31,7 @@ release: ## Generate a new release of the extension. Only for telease manager
# Requires sudo.
# Use the RELEASE_VERSION environment variable to deploy a specific version:
# sudo make deploy RELEASE_VERSION=1.0.0
deploy: ## Deploy a released extension. Only for release manager. Requires sudo.
deploy:
$(MAKE) -C $(EXT_DIR) deploy
$(MAKE) -C $(PYP_DIR) deploy

View File

@ -3,9 +3,20 @@ EXTENSION = crankshaft
PACKAGE = crankshaft
EXTVERSION = $(shell grep default_version $(SELF_DIR)/src/pg/$(EXTENSION).control | sed -e "s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
RELEASE_VERSION ?= $(EXTVERSION)
SED = sed
PIP = pip
NOSETESTS = nosetests
AWK = awk
PG_CONFIG = pg_config
PG_PARALLEL := $(shell $(PG_CONFIG) --version | ($(AWK) '{$$2*=1000; if ($$2 >= 9600) print 1; else print 0;}' 2> /dev/null || echo 0))
PG_VERSION_1000 := $(shell $(PG_CONFIG) --version | $(AWK) '{$$2*=1000; print $$2}')
PG_PARALLEL := $(shell [ $(PG_VERSION_1000) -ge 9600 ] && echo true)
PG_12plus := $(shell [ $(PG_VERSION_1000) -ge 12000 ] && echo true)
PYTHON3 ?= $(PG_12plus)
ifeq ($(PYTHON3), true)
PIP := python3 -m pip
else
PIP := python2 -m pip
endif

View File

@ -1,7 +1,13 @@
0.9.0 (XXXX-XX-XX)
------------------
* Compatibility with PG12.
* Compatibility with python3 (enable with PYTHON3=true env variable, default in PG12+).
0.8.2 (2019-02-07)
------------------
* Update dependencies to match what it's being used in production.
* Update travis to xenial, PG10 and 11, and postgis 2.6
* Update travis to xenial, PG10 and 11, and postgis 2.5
* Compatibility with PG11
0.8.1 (2018-03-12)

View File

@ -8,28 +8,21 @@ CARTO Spatial Analysis extension for PostgreSQL.
* `src/` source code
- `pg/` contains the PostgreSQL extension source code
- `py/` Python module source code
* `release` reseleased versions
* `release` released versions
## Requirements
* PostgreSQL
* plpythonu and postgis extensions
* plpythonu (for PG12+, plpython3u) and postgis extensions
* python-scipy system package (see [src/py/README.md](https://github.com/CartoDB/crankshaft/blob/develop/src/py/README.md))
# Development Process
We distinguish two roles:
* *developers* will implement new functionality and bugfixes into
the codebase.
* A *release manager* will handle the release process.
We use the branch `develop` as the main integration branch for development. The `master` is reserved to handle releases.
The process is as follows:
1. Create a new **topic branch** from `develop` for any new feature
or bugfix and commit their changes to it:
1. Create a new **topic branch** from `develop` for any new feature or bugfix and commit their changes to it:
```shell
git fetch && git checkout -b my-cool-feature origin/develop
@ -39,7 +32,6 @@ or bugfix and commit their changes to it:
1. Update the [NEWS.md](https://github.com/CartoDB/crankshaft/blob/develop/NEWS.md) doc.
1. Create a pull request and mention relevant people for a **peer review**.
1. Address the comments and improvements you get from the peer review.
1. Mention `@CartoDB/dataservices` in the PR to get it merged into `develop`.
In order for a pull request to be accepted, the following criteria should be met:
* The peer review should pass and no major issue should be left unaddressed.

View File

@ -1,8 +1,5 @@
# Release & Deployment Process
The release process of a new version of the extension
shall be performed by the designated *Release Manager*.
## Release steps
* Make sure `develop` branch passes all the tests.
* Merge `develop` into `master`

View File

@ -25,10 +25,6 @@ psql -c "SELECT * FROM pg_available_extension_versions WHERE name LIKE 'cranksha
# Install in the fresh DB
psql $DBNAME <<'EOF'
-- Install dependencies
CREATE EXTENSION plpythonu;
CREATE EXTENSION postgis;
-- Create role publicuser if it does not exist
DO
$$
@ -44,7 +40,7 @@ END
$$ LANGUAGE plpgsql;
-- Install the default version
CREATE EXTENSION crankshaft;
CREATE EXTENSION crankshaft CASCADE;
\dx
EOF