Skip to content

Commit

Permalink
Upgrade to PostGIS 3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans committed Dec 10, 2024
1 parent f47320a commit d98928d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ build
postgis--*.zip
*.pyc
__pycache__
/.venv
2 changes: 1 addition & 1 deletion MANIFEST.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "postgis"
version = "3.4.3"
version = "3.5.0"
files = ["postgis.edgeql"]
postgres_files = "pg"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ from inside an edgedb development venv.
To build, install, and test into a dev env:
- ``make``
- ``make zip``
- ``edb load-ext postgis--3.4.3.zip``
- ``edb load-ext postgis--3.5.0.zip``
- ``edb test tests/test_edgeql_postgis.py``
2 changes: 1 addition & 1 deletion postgis
Submodule postgis updated 1036 files
4 changes: 2 additions & 2 deletions postgis.edgeql
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#


create extension package postgis version '3.4.3' {
create extension package postgis version '3.5.0' {
set ext_module := "ext::postgis";
set sql_extensions := ["postgis >=3.4.0,<4.0.0"];
set sql_extensions := ["postgis >=3.5.0,<4.0.0"];

set sql_setup_script := $$
-- Make it possible to have `!=`, `?!=`, and `not in` for geometry
Expand Down
7 changes: 4 additions & 3 deletions scripts/gen_ext_postgis.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
#
# This source file is part of the EdgeDB open source project.
#
Expand Down Expand Up @@ -403,7 +404,7 @@ def parse_postgis_extension(
for fpath in root.glob('postgis*.sql'):
name = fpath.name
# We might scan more postgis extension files
if name in {'postgis--3.4.3.sql'}:
if name in {'postgis--3.5.0.sql'}:
with open(fpath, mode='rt') as f:
sql_query = ''.join(
line for line in f.readlines()
Expand Down Expand Up @@ -830,7 +831,7 @@ def rst_print_categories(func_categories, file=None):


def main(show_broken=False):
base_build = pathlib.Path('build').resolve()
base_build = pathlib.Path(__file__).parent.parent.resolve()
# Used to generate both .edgeql and .rst
functions = collections.defaultdict(list)
aggregates = collections.defaultdict(list)
Expand Down Expand Up @@ -919,7 +920,7 @@ def main(show_broken=False):

# Create ext_postgis directory in `build` for output files for the
# extension and the docs.
build_dir = pathlib.Path('build').resolve() / 'ext_postgis'
build_dir = base_build
if not build_dir.exists():
os.makedirs(build_dir)

Expand Down
4 changes: 2 additions & 2 deletions scripts/postgis.template.edgeql
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#


create extension package postgis version '3.4.3' {
create extension package postgis version '3.5.0' {
set ext_module := "ext::postgis";
set sql_extensions := ["postgis >=3.4.3,<4.0.0"];
set sql_extensions := ["postgis >=3.5.0,<4.0.0"];

set sql_setup_script := $$
-- Make it possible to have `!=`, `?!=`, and `not in` for geometry
Expand Down
2 changes: 1 addition & 1 deletion tests/test_edgeql_postgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def get_setup_script(cls):
with open(os.path.join(root, 'edb/lib/ext/postgis.edgeql')) as f:
contents = f.read()
to_add = '''
drop extension package postgis version '3.4.3';
drop extension package postgis version '3.5.0';
''' + contents
splice = '__internal_testmode := true;'
res = res.replace(splice, splice + to_add)
Expand Down

0 comments on commit d98928d

Please sign in to comment.