diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 5c2447e..c26d63f 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -23,6 +23,7 @@ jobs: timeoutInMinutes: 360 variables: CONDA_BLD_PATH: D:\\bld\\ + UPLOAD_TEMP: D:\\tmp steps: - task: PythonScript@0 @@ -81,6 +82,9 @@ jobs: - script: | set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + set "TEMP=$(UPLOAD_TEMP)" + if not exist "%TEMP%\" md "%TEMP%" + set "TMP=%TEMP%" call activate base upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml displayName: Upload package diff --git a/.ci_support/linux_64_numpy1.20python3.8.____cpython.yaml b/.ci_support/linux_64_numpy1.20python3.8.____cpython.yaml index 5146b99..6ac540f 100644 --- a/.ci_support/linux_64_numpy1.20python3.8.____cpython.yaml +++ b/.ci_support/linux_64_numpy1.20python3.8.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_name: - cos6 channel_sources: @@ -11,11 +11,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.20' pin_run_as_build: diff --git a/.ci_support/linux_64_numpy1.20python3.9.____cpython.yaml b/.ci_support/linux_64_numpy1.20python3.9.____cpython.yaml index 0ef1933..c00e146 100644 --- a/.ci_support/linux_64_numpy1.20python3.9.____cpython.yaml +++ b/.ci_support/linux_64_numpy1.20python3.9.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_name: - cos6 channel_sources: @@ -11,11 +11,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.20' pin_run_as_build: diff --git a/.ci_support/linux_64_numpy1.21python3.10.____cpython.yaml b/.ci_support/linux_64_numpy1.21python3.10.____cpython.yaml index 4573774..b9ba159 100644 --- a/.ci_support/linux_64_numpy1.21python3.10.____cpython.yaml +++ b/.ci_support/linux_64_numpy1.21python3.10.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_name: - cos6 channel_sources: @@ -11,11 +11,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.21' pin_run_as_build: diff --git a/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml b/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml index e4ab6ad..aaf6456 100644 --- a/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml +++ b/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_name: - cos6 channel_sources: @@ -11,11 +11,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.23' pin_run_as_build: diff --git a/.ci_support/linux_aarch64_numpy1.20python3.8.____cpython.yaml b/.ci_support/linux_aarch64_numpy1.20python3.8.____cpython.yaml index 487c01b..8c28429 100644 --- a/.ci_support/linux_aarch64_numpy1.20python3.8.____cpython.yaml +++ b/.ci_support/linux_aarch64_numpy1.20python3.8.____cpython.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_arch: - aarch64 cdt_name: @@ -15,11 +15,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.20' pin_run_as_build: diff --git a/.ci_support/linux_aarch64_numpy1.20python3.9.____cpython.yaml b/.ci_support/linux_aarch64_numpy1.20python3.9.____cpython.yaml index e466aba..b5241bf 100644 --- a/.ci_support/linux_aarch64_numpy1.20python3.9.____cpython.yaml +++ b/.ci_support/linux_aarch64_numpy1.20python3.9.____cpython.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_arch: - aarch64 cdt_name: @@ -15,11 +15,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.20' pin_run_as_build: diff --git a/.ci_support/linux_aarch64_numpy1.21python3.10.____cpython.yaml b/.ci_support/linux_aarch64_numpy1.21python3.10.____cpython.yaml index cd4cf0c..37a5ffb 100644 --- a/.ci_support/linux_aarch64_numpy1.21python3.10.____cpython.yaml +++ b/.ci_support/linux_aarch64_numpy1.21python3.10.____cpython.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_arch: - aarch64 cdt_name: @@ -15,11 +15,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.21' pin_run_as_build: diff --git a/.ci_support/linux_aarch64_numpy1.23python3.11.____cpython.yaml b/.ci_support/linux_aarch64_numpy1.23python3.11.____cpython.yaml index dd30797..39ea893 100644 --- a/.ci_support/linux_aarch64_numpy1.23python3.11.____cpython.yaml +++ b/.ci_support/linux_aarch64_numpy1.23python3.11.____cpython.yaml @@ -3,7 +3,7 @@ BUILD: c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_arch: - aarch64 cdt_name: @@ -15,11 +15,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.23' pin_run_as_build: diff --git a/.ci_support/linux_ppc64le_numpy1.20python3.8.____cpython.yaml b/.ci_support/linux_ppc64le_numpy1.20python3.8.____cpython.yaml index 641e02a..ee91a65 100644 --- a/.ci_support/linux_ppc64le_numpy1.20python3.8.____cpython.yaml +++ b/.ci_support/linux_ppc64le_numpy1.20python3.8.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_name: - cos7 channel_sources: @@ -11,11 +11,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.20' pin_run_as_build: diff --git a/.ci_support/linux_ppc64le_numpy1.20python3.9.____cpython.yaml b/.ci_support/linux_ppc64le_numpy1.20python3.9.____cpython.yaml index 35d0ded..bf3c32c 100644 --- a/.ci_support/linux_ppc64le_numpy1.20python3.9.____cpython.yaml +++ b/.ci_support/linux_ppc64le_numpy1.20python3.9.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_name: - cos7 channel_sources: @@ -11,11 +11,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.20' pin_run_as_build: diff --git a/.ci_support/linux_ppc64le_numpy1.21python3.10.____cpython.yaml b/.ci_support/linux_ppc64le_numpy1.21python3.10.____cpython.yaml index b860abc..b29804b 100644 --- a/.ci_support/linux_ppc64le_numpy1.21python3.10.____cpython.yaml +++ b/.ci_support/linux_ppc64le_numpy1.21python3.10.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_name: - cos7 channel_sources: @@ -11,11 +11,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.21' pin_run_as_build: diff --git a/.ci_support/linux_ppc64le_numpy1.23python3.11.____cpython.yaml b/.ci_support/linux_ppc64le_numpy1.23python3.11.____cpython.yaml index 6138850..5bb8789 100644 --- a/.ci_support/linux_ppc64le_numpy1.23python3.11.____cpython.yaml +++ b/.ci_support/linux_ppc64le_numpy1.23python3.11.____cpython.yaml @@ -1,7 +1,7 @@ c_compiler: - gcc c_compiler_version: -- '10' +- '11' cdt_name: - cos7 channel_sources: @@ -11,11 +11,11 @@ channel_targets: cxx_compiler: - gxx cxx_compiler_version: -- '10' +- '11' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 libgdal: -- '3.5' +- '3.6' numpy: - '1.23' pin_run_as_build: diff --git a/.ci_support/migrations/libgdal36.yaml b/.ci_support/migrations/libgdal36.yaml new file mode 100644 index 0000000..b519d1e --- /dev/null +++ b/.ci_support/migrations/libgdal36.yaml @@ -0,0 +1,7 @@ +__migrator: + build_number: 1 + kind: version + migration_number: 1 +libgdal: +- '3.6' +migrator_ts: 1668608830.3535678 diff --git a/.ci_support/osx_64_numpy1.20python3.8.____cpython.yaml b/.ci_support/osx_64_numpy1.20python3.8.____cpython.yaml index dfbd57a..6afaae8 100644 --- a/.ci_support/osx_64_numpy1.20python3.8.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.20python3.8.____cpython.yaml @@ -13,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '14' libgdal: -- '3.5' +- '3.6' macos_machine: - x86_64-apple-darwin13.4.0 numpy: diff --git a/.ci_support/osx_64_numpy1.20python3.9.____cpython.yaml b/.ci_support/osx_64_numpy1.20python3.9.____cpython.yaml index 132b343..70652ef 100644 --- a/.ci_support/osx_64_numpy1.20python3.9.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.20python3.9.____cpython.yaml @@ -13,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '14' libgdal: -- '3.5' +- '3.6' macos_machine: - x86_64-apple-darwin13.4.0 numpy: diff --git a/.ci_support/osx_64_numpy1.21python3.10.____cpython.yaml b/.ci_support/osx_64_numpy1.21python3.10.____cpython.yaml index 125a349..d68bdb3 100644 --- a/.ci_support/osx_64_numpy1.21python3.10.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.21python3.10.____cpython.yaml @@ -13,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '14' libgdal: -- '3.5' +- '3.6' macos_machine: - x86_64-apple-darwin13.4.0 numpy: diff --git a/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml b/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml index 2e18aae..e4efaba 100644 --- a/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml +++ b/.ci_support/osx_64_numpy1.23python3.11.____cpython.yaml @@ -13,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '14' libgdal: -- '3.5' +- '3.6' macos_machine: - x86_64-apple-darwin13.4.0 numpy: diff --git a/.ci_support/osx_arm64_numpy1.20python3.8.____cpython.yaml b/.ci_support/osx_arm64_numpy1.20python3.8.____cpython.yaml index a9d6528..09199d5 100644 --- a/.ci_support/osx_arm64_numpy1.20python3.8.____cpython.yaml +++ b/.ci_support/osx_arm64_numpy1.20python3.8.____cpython.yaml @@ -13,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '14' libgdal: -- '3.5' +- '3.6' macos_machine: - arm64-apple-darwin20.0.0 numpy: diff --git a/.ci_support/osx_arm64_numpy1.20python3.9.____cpython.yaml b/.ci_support/osx_arm64_numpy1.20python3.9.____cpython.yaml index 48237a5..fa2c924 100644 --- a/.ci_support/osx_arm64_numpy1.20python3.9.____cpython.yaml +++ b/.ci_support/osx_arm64_numpy1.20python3.9.____cpython.yaml @@ -13,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '14' libgdal: -- '3.5' +- '3.6' macos_machine: - arm64-apple-darwin20.0.0 numpy: diff --git a/.ci_support/osx_arm64_numpy1.21python3.10.____cpython.yaml b/.ci_support/osx_arm64_numpy1.21python3.10.____cpython.yaml index 798f67e..b2f85bf 100644 --- a/.ci_support/osx_arm64_numpy1.21python3.10.____cpython.yaml +++ b/.ci_support/osx_arm64_numpy1.21python3.10.____cpython.yaml @@ -13,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '14' libgdal: -- '3.5' +- '3.6' macos_machine: - arm64-apple-darwin20.0.0 numpy: diff --git a/.ci_support/osx_arm64_numpy1.23python3.11.____cpython.yaml b/.ci_support/osx_arm64_numpy1.23python3.11.____cpython.yaml index 3465cc8..437e8cd 100644 --- a/.ci_support/osx_arm64_numpy1.23python3.11.____cpython.yaml +++ b/.ci_support/osx_arm64_numpy1.23python3.11.____cpython.yaml @@ -13,7 +13,7 @@ cxx_compiler: cxx_compiler_version: - '14' libgdal: -- '3.5' +- '3.6' macos_machine: - arm64-apple-darwin20.0.0 numpy: diff --git a/.ci_support/win_64_numpy1.20python3.8.____cpython.yaml b/.ci_support/win_64_numpy1.20python3.8.____cpython.yaml index acfa0a2..f6202c1 100644 --- a/.ci_support/win_64_numpy1.20python3.8.____cpython.yaml +++ b/.ci_support/win_64_numpy1.20python3.8.____cpython.yaml @@ -7,7 +7,7 @@ channel_targets: cxx_compiler: - vs2019 libgdal: -- '3.5' +- '3.6' numpy: - '1.20' pin_run_as_build: diff --git a/.ci_support/win_64_numpy1.20python3.9.____cpython.yaml b/.ci_support/win_64_numpy1.20python3.9.____cpython.yaml index 80c6bee..d0f6567 100644 --- a/.ci_support/win_64_numpy1.20python3.9.____cpython.yaml +++ b/.ci_support/win_64_numpy1.20python3.9.____cpython.yaml @@ -7,7 +7,7 @@ channel_targets: cxx_compiler: - vs2019 libgdal: -- '3.5' +- '3.6' numpy: - '1.20' pin_run_as_build: diff --git a/.ci_support/win_64_numpy1.21python3.10.____cpython.yaml b/.ci_support/win_64_numpy1.21python3.10.____cpython.yaml index 96f6aad..248e8c8 100644 --- a/.ci_support/win_64_numpy1.21python3.10.____cpython.yaml +++ b/.ci_support/win_64_numpy1.21python3.10.____cpython.yaml @@ -7,7 +7,7 @@ channel_targets: cxx_compiler: - vs2019 libgdal: -- '3.5' +- '3.6' numpy: - '1.21' pin_run_as_build: diff --git a/.ci_support/win_64_numpy1.23python3.11.____cpython.yaml b/.ci_support/win_64_numpy1.23python3.11.____cpython.yaml index a2829c7..808f67a 100644 --- a/.ci_support/win_64_numpy1.23python3.11.____cpython.yaml +++ b/.ci_support/win_64_numpy1.23python3.11.____cpython.yaml @@ -7,7 +7,7 @@ channel_targets: cxx_compiler: - vs2019 libgdal: -- '3.5' +- '3.6' numpy: - '1.23' pin_run_as_build: diff --git a/recipe/0001-Port-patch-from-Toblerity-Fiona-1122.patch b/recipe/0001-Port-patch-from-Toblerity-Fiona-1122.patch new file mode 100644 index 0000000..dc0cf16 --- /dev/null +++ b/recipe/0001-Port-patch-from-Toblerity-Fiona-1122.patch @@ -0,0 +1,270 @@ +From c0ed73b4ddf362679377d7bc572eaf0b100aa8c7 Mon Sep 17 00:00:00 2001 +From: Klaus Zimmermann +Date: Mon, 5 Dec 2022 13:30:37 +0100 +Subject: [PATCH] Port patch from Toblerity/Fiona#1122 + +--- + fiona/drvsupport.py | 27 +++++++++++++++++---------- + pytest.ini | 3 ++- + tests/conftest.py | 18 ++++++++++++++++++ + tests/test_datetime.py | 6 ++++++ + tests/test_drvsupport.py | 13 +++++++++++++ + 5 files changed, 56 insertions(+), 11 deletions(-) + +diff --git a/fiona/drvsupport.py b/fiona/drvsupport.py +index fd44f76..1320248 100644 +--- a/fiona/drvsupport.py ++++ b/fiona/drvsupport.py +@@ -40,7 +40,7 @@ supported_drivers = dict([ + # ESRI FileGDB FileGDB Yes Yes No, needs FileGDB API library + # multi-layer + ("FileGDB", "raw"), +- ("OpenFileGDB", "r"), ++ ("OpenFileGDB", "raw"), + # ESRI Personal GeoDatabase PGeo No Yes No, needs ODBC library + # ESRI ArcSDE SDE No Yes No, needs ESRI SDE + # ESRIJSON ESRIJSON No Yes Yes +@@ -48,11 +48,11 @@ supported_drivers = dict([ + # ESRI Shapefile ESRI Shapefile Yes Yes Yes + ("ESRI Shapefile", "raw"), + # FMEObjects Gateway FMEObjects Gateway No Yes No, needs FME +- ("FlatGeobuf", "rw"), ++ ("FlatGeobuf", "raw"), + # GeoJSON GeoJSON Yes Yes Yes + ("GeoJSON", "raw"), + # GeoJSONSeq GeoJSON sequences Yes Yes Yes +- ("GeoJSONSeq", "rw"), ++ ("GeoJSONSeq", "raw"), + # GĂ©oconcept Export Geoconcept Yes Yes Yes + # multi-layers + # ("Geoconcept", "raw"), +@@ -157,12 +157,16 @@ driver_mode_mingdal = { + 'w': {'GPKG': (1, 11, 0), + 'PCIDSK': (2, 0, 0), + 'GeoJSONSeq': (2, 4, 0), +- 'FlatGeobuf': (3, 1, 3)}, ++ 'FlatGeobuf': (3, 1, 3), ++ 'OpenFileGDB': (3, 6, 0)}, + + 'a': {'GPKG': (1, 11, 0), + 'PCIDSK': (2, 0, 0), + 'GeoJSON': (2, 1, 0), +- 'MapInfo File': (2, 0, 0)} ++ 'GeoJSONSeq': (3, 6, 0), ++ 'MapInfo File': (2, 0, 0), ++ 'FlatGeobuf': (3, 5, 1), ++ 'OpenFileGDB': (3, 6, 0)} + } + + +@@ -253,8 +257,9 @@ _driver_field_type_unsupported = { + 'BNA': None, + 'DXF': None, + 'PCIDSK': (2, 1, 0), +- 'FileGDB': None, +- 'FlatGeobuf': None ++ 'FileGDB': (3, 5, 0), ++ 'FlatGeobuf': None, ++ 'OpenFileGDB': None + }, + 'datetime': { + 'ESRI Shapefile': None, +@@ -271,8 +276,9 @@ _driver_field_type_unsupported = { + 'BNA': None, + 'DXF': None, + 'PCIDSK': (2, 1, 0), +- 'FileGDB': None, +- 'FlatGeobuf': None ++ 'FileGDB': (3, 5, 0), ++ 'FlatGeobuf': None, ++ 'OpenFileGDB': None + } + } + +@@ -331,7 +337,8 @@ def _driver_supports_timezones(driver, field_type): + # None: driver never supports timezones, (2, 0, 0): driver supports timezones with GDAL 2.0.0 + _drivers_not_supporting_milliseconds = { + 'GPSTrackMaker': None, +- 'FileGDB': None ++ 'FileGDB': None, ++ 'OpenFileGDB': None + } + + +diff --git a/pytest.ini b/pytest.ini +index b561de3..50a3313 100644 +--- a/pytest.ini ++++ b/pytest.ini +@@ -8,6 +8,7 @@ filterwarnings = + markers = + iconv: marks tests that require gdal to be compiled with iconv + network: marks tests that require a network connection +- wheel: marks test that only works when installed from wheel ++ wheel: marks tests that only works when installed from wheel ++ gdal: marks tests that are only dependent on GDAL functionality (e.g. for drvsupport) + + testpaths = tests +diff --git a/tests/conftest.py b/tests/conftest.py +index 05219ff..3da4b89 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -32,6 +32,24 @@ driver_extensions = {'DXF': 'dxf', + 'FlatGeobuf': 'fgb'} + + ++def pytest_collection_modifyitems(config, items): ++ ++ # Fiona contains some tests that depend only on GDALs behavior. ++ # E.g. some test the driver specific access modes maintained in ++ # fiona/drvsupport.py for different GDAL versions. ++ # These tests can fail on exotic architectures (e.g. not returning ++ # the exact same value) ++ # We explicitly enable these tests on Fiona CI using pytest -m gdal ++ # and hide these tests otherwise. ++ markers_options = config.getoption("-m", "") ++ if "gdal" not in markers_options: ++ skip_gdal = pytest.mark.skip(reason="use '-m gdal' to run GDAL related tests.") ++ for item in items: ++ gdal_marker = item.get_closest_marker("gdal") ++ if gdal_marker is not None and gdal_marker.name == "gdal": ++ item.add_marker(skip_gdal) ++ ++ + def pytest_report_header(config): + headers = [] + # gdal version number +diff --git a/tests/test_datetime.py b/tests/test_datetime.py +index 4de8053..d5e4639 100644 +--- a/tests/test_datetime.py ++++ b/tests/test_datetime.py +@@ -269,6 +269,7 @@ test_cases_datefield, test_cases_datefield_to_str, test_cases_datefield_not_supp + + + @pytest.mark.parametrize("driver, field_type", test_cases_datefield) ++@pytest.mark.gdal + def test_datefield(tmpdir, driver, field_type): + """ + Test date, time, datetime field types. +@@ -342,6 +343,7 @@ def test_datefield(tmpdir, driver, field_type): + + + @pytest.mark.parametrize("driver, field_type", test_cases_datefield_to_str) ++@pytest.mark.gdal + def test_datefield_driver_converts_to_string(tmpdir, driver, field_type): + """ + Test handling of date, time, datetime for drivers that convert these types to string. +@@ -528,6 +530,7 @@ def test_datefield_driver_converts_to_string(tmpdir, driver, field_type): + + @pytest.mark.filterwarnings('ignore:.*driver silently converts *:UserWarning') + @pytest.mark.parametrize("driver,field_type", test_cases_datefield + test_cases_datefield_to_str) ++@pytest.mark.gdal + def test_datefield_null(tmpdir, driver, field_type): + """ + Test handling of null values for date, time, datetime types for write capable drivers +@@ -560,6 +563,7 @@ def test_datefield_null(tmpdir, driver, field_type): + + + @pytest.mark.parametrize("driver, field_type", test_cases_datefield_not_supported) ++@pytest.mark.gdal + def test_datetime_field_unsupported(tmpdir, driver, field_type): + """ Test if DriverSupportError is raised for unsupported field_types""" + schema = get_schema(driver, field_type) +@@ -575,6 +579,7 @@ def test_datetime_field_unsupported(tmpdir, driver, field_type): + + + @pytest.mark.parametrize("driver, field_type", test_cases_datefield_not_supported) ++@pytest.mark.gdal + def test_datetime_field_type_marked_not_supported_is_not_supported(tmpdir, driver, field_type, monkeypatch): + """ Test if a date/datetime/time field type marked as not not supported is really not supported + +@@ -628,6 +633,7 @@ def generate_tostr_testcases(): + + @pytest.mark.filterwarnings('ignore:.*driver silently converts *:UserWarning') + @pytest.mark.parametrize("driver,field_type", test_cases_datefield_to_str) ++@pytest.mark.gdal + def test_driver_marked_as_silently_converts_to_str_converts_silently_to_str(tmpdir, driver, field_type, monkeypatch): + """ Test if a driver and field_type is marked in fiona.drvsupport.driver_converts_to_str to convert to str really + silently converts to str +diff --git a/tests/test_drvsupport.py b/tests/test_drvsupport.py +index dad53b6..a1ec328 100644 +--- a/tests/test_drvsupport.py ++++ b/tests/test_drvsupport.py +@@ -16,6 +16,7 @@ log = logging.getLogger() + + + @requires_gdal24 ++@pytest.mark.gdal + @pytest.mark.parametrize("format", ["GeoJSON", "ESRIJSON", "TopoJSON", "GeoJSONSeq"]) + def test_geojsonseq(format): + """Format is available""" +@@ -25,6 +26,7 @@ def test_geojsonseq(format): + @pytest.mark.parametrize( + "driver", [driver for driver, raw in supported_drivers.items() if "w" in raw] + ) ++@pytest.mark.gdal + def test_write_or_driver_error(tmpdir, driver, testdata_generator): + """ + Test if write mode works. +@@ -73,6 +75,7 @@ def test_write_or_driver_error(tmpdir, driver, testdata_generator): + @pytest.mark.parametrize( + "driver", [driver for driver in driver_mode_mingdal["w"].keys()] + ) ++@pytest.mark.gdal + def test_write_does_not_work_when_gdal_smaller_mingdal( + tmpdir, driver, testdata_generator, monkeypatch + ): +@@ -112,6 +115,7 @@ def test_write_does_not_work_when_gdal_smaller_mingdal( + @pytest.mark.parametrize( + "driver", [driver for driver, raw in supported_drivers.items() if "a" in raw] + ) ++@pytest.mark.gdal + def test_append_or_driver_error(tmpdir, testdata_generator, driver): + """Test if driver supports append mode. + +@@ -178,6 +182,7 @@ def test_append_or_driver_error(tmpdir, testdata_generator, driver): + if driver in supported_drivers + ], + ) ++@pytest.mark.gdal + def test_append_does_not_work_when_gdal_smaller_mingdal( + tmpdir, driver, testdata_generator, monkeypatch + ): +@@ -190,6 +195,10 @@ def test_append_does_not_work_when_gdal_smaller_mingdal( + if driver == "BNA" and GDALVersion.runtime() < GDALVersion(2, 0): + pytest.skip("BNA driver segfaults with gdal 1.11") + ++ if driver == "FlatGeobuf" and GDALVersion.runtime() < GDALVersion(3, 5): ++ pytest.skip("FlatGeobuf segfaults with GDAL < 3.5.1") ++ ++ + path = str(tmpdir.join(get_temp_filename(driver))) + schema, crs, records1, records2, test_equal, create_kwargs = testdata_generator( + driver, range(0, 5), range(5, 10) +@@ -236,6 +245,7 @@ def test_append_does_not_work_when_gdal_smaller_mingdal( + @pytest.mark.parametrize( + "driver", [driver for driver, raw in supported_drivers.items() if raw == "r"] + ) ++@pytest.mark.gdal + def test_no_write_driver_cannot_write(tmpdir, driver, testdata_generator, monkeypatch): + """Test if read only driver cannot write + +@@ -271,6 +281,7 @@ def test_no_write_driver_cannot_write(tmpdir, driver, testdata_generator, monkey + if "w" in raw and "a" not in raw + ], + ) ++@pytest.mark.gdal + def test_no_append_driver_cannot_append( + tmpdir, driver, testdata_generator, monkeypatch + ): +@@ -285,6 +296,8 @@ def test_no_append_driver_cannot_append( + + if driver == "BNA" and GDALVersion.runtime() < GDALVersion(2, 0): + pytest.skip("BNA driver segfaults with gdal 1.11") ++ if driver == "FlatGeobuf" and get_gdal_version_num() == calc_gdal_version_num(3, 5, 0): ++ pytest.skip("FlatGeobuf driver segfaults with gdal 3.5.0") + + path = str(tmpdir.join(get_temp_filename(driver))) + schema, crs, records1, records2, test_equal, create_kwargs = testdata_generator( +-- +2.35.1 + diff --git a/recipe/0002-add-OpenFileGDB-extension.patch b/recipe/0002-add-OpenFileGDB-extension.patch new file mode 100644 index 0000000..8352197 --- /dev/null +++ b/recipe/0002-add-OpenFileGDB-extension.patch @@ -0,0 +1,11 @@ +diff -ruN -x __pycache__ -x obj -x '*~' -x tags -x TAGS Fiona-1.8.22.drvsupport/tests/conftest.py Fiona-1.8.22.OpenFileGDB/tests/conftest.py +--- Fiona-1.8.22.drvsupport/tests/conftest.py 2022-12-09 12:53:22.695413628 +0100 ++++ Fiona-1.8.22.OpenFileGDB/tests/conftest.py 2022-12-09 13:13:02.617323974 +0100 +@@ -18,6 +18,7 @@ + 'CSV': 'csv', + 'ESRI Shapefile': 'shp', + 'FileGDB': 'gdb', ++ 'OpenFileGDB': 'gdb', + 'GML': 'gml', + 'GPX': 'gpx', + 'GPSTrackMaker': 'gtm', diff --git a/recipe/bld.bat b/recipe/bld.bat index 4ae9a4a..dd6814e 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -5,5 +5,5 @@ set GDAL_VERSION=%%F if errorlevel 1 exit 1 echo "set GDAL_VERSION=%GDAL_VERSION%" -%PYTHON% setup.py build_ext -I"%LIBRARY_INC%" -lgdal_i -L"%LIBRARY_LIB%" install --single-version-externally-managed --record record.txt +%PYTHON% setup.py build_ext -I"%LIBRARY_INC%" -lgdal -L"%LIBRARY_LIB%" install --single-version-externally-managed --record record.txt if errorlevel 1 exit 1 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 8f8d604..4b96ad9 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -7,9 +7,17 @@ package: source: url: https://github.com/Toblerity/Fiona/archive/refs/tags/{{ version }}.zip sha256: a4dfed7c98cbecefe66e1824ca44685b526cfe9f98a578b769a570a67146d1e8 + patches: + # NB: Both patches will become obsolete with Fiona >= 1.9 + # This first one was merged for 1.9 as #1222 + - 0001-Port-patch-from-Toblerity-Fiona-1122.patch + # This second one will be obsolete because the metadata + # handling has been overhauled and the extensions are + # determined directly from the drivers + - 0002-add-OpenFileGDB-extension.patch build: - number: 2 + number: 3 skip: true # [win and vc<14] script_env: - GDAL_ENABLE_DEPRECATED_DRIVER_GTM=YES