Skip to content

Commit

Permalink
Travis: Still trying to fix problems with PostgreSQL 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Sep 25, 2020
1 parent 31994a9 commit 56ca552
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,18 @@ script:
- tox -e $TOXENV

addons:
# test with last version that still supports OIDs
# last PostgreSQL version that still supports OIDs (11)
postgresql: "11"
apt:
packages:
- postgresql-11
- postgresql-server-dev-11

services:
- postgresql

before_script:
- sudo service postgresql stop
- sudo apt-get remove -y postgresql\*
- sudo apt-get install postgresql-11 postgresql-client-11
- sudo -u postgres sed -i "s/port = 54[0-9][0-9]/port = 5432/" /etc/postgresql/11/main/postgresql.conf
- sudo service postgresql start 11
- sudo -u postgres psql -c 'create database unittest'
Expand Down
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,21 @@ class build_pg_ext(build_ext):
('escaping-funcs', None, "enable string escaping functions"),
('no-escaping-funcs', None, "disable string escaping functions"),
('ssl-info', None, "use new ssl info functions"),
('no-ssl-info', None, "do not use new ssl info functions")]
('no-ssl-info', None, "do not use new ssl info functions"),
('memory-size', None, "enable new memory size function"),
('no-memory-size', None, "disable new memory size function")]

boolean_options = build_ext.boolean_options + [
'strict', 'direct-access', 'large-objects', 'default-vars',
'escaping-funcs', 'ssl-info']
'escaping-funcs', 'ssl-info', 'memory-size']

negative_opt = {
'no-direct-access': 'direct-access',
'no-large-objects': 'large-objects',
'no-default-vars': 'default-vars',
'no-escaping-funcs': 'escaping-funcs',
'no-ssl-info': 'ssl-info'}
'no-ssl-info': 'ssl-info',
'no-memory-size': 'memory-size'}

def get_compiler(self):
"""Return the C compiler used for building the extension."""
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ commands =

[testenv]
commands =
python setup.py clean --all build_ext --force --inplace --strict
python setup.py clean --all build_ext --force --inplace --strict --ssl-info --memory-size
python -m unittest discover {posargs}

0 comments on commit 56ca552

Please sign in to comment.