diff --git a/pkgs/development/python-modules/fiona/default.nix b/pkgs/development/python-modules/fiona/default.nix index 6a7c8b51bee3..04d5d9b8f5f6 100644 --- a/pkgs/development/python-modules/fiona/default.nix +++ b/pkgs/development/python-modules/fiona/default.nix @@ -95,6 +95,64 @@ buildPythonPackage rec { # see: https://github.com/Toblerity/Fiona/issues/1273 "test_append_memoryfile_drivers" + + # AssertionError CLI exists with non-zero error code + # This is a regression introduced by https://github.com/NixOS/nixpkgs/pull/448189 + "test_bbox_json_yes" + "test_bbox_no" + "test_bbox_where" + "test_bbox_yes" + "test_bbox_yes_two_files" + "test_bool_seq" + "test_bounds_explode_with_obj" + "test_calc_seq" + "test_collect_ld" + "test_collect_no_rs" + "test_collect_noparse" + "test_collect_noparse_records" + "test_collect_noparse_rs" + "test_collect_rec_buffered" + "test_collect_rs" + "test_creation_options" + "test_different_crs" + "test_distrib" + "test_distrib_no_rs" + "test_dst_crs_default_to_src_crs" + "test_dst_crs_epsg3857" + "test_dst_crs_no_src" + "test_existing_property" + "test_explode" + "test_explode_output_rs" + "test_explode_pp" + "test_explode_with_id" + "test_filter" + "test_fio_load_layer" + "test_fio_load_layer_append" + "test_load__auto_detect_format" + "test_load__auto_detect_format" + "test_load__auto_detect_format" + "test_load__auto_detect_format" + "test_load__auto_detect_format" + "test_map_count" + "test_multi_layer" + "test_one" + "test_precision" + "test_reduce_area" + "test_reduce_area" + "test_reduce_union" + "test_reduce_union_zip_properties" + "test_seq" + "test_seq" + "test_seq_no_rs" + "test_seq_rs" + "test_seq_rs" + "test_two" + "test_vfs" + "test_where_no" + "test_where_yes" + "test_where_yes_two_files" + "test_with_id" + "test_with_obj" ]; pythonImportsCheck = [ "fiona" ]; diff --git a/pkgs/development/python-modules/gtts/default.nix b/pkgs/development/python-modules/gtts/default.nix index 36b3f6835d75..24bc7eb2ed4f 100644 --- a/pkgs/development/python-modules/gtts/default.nix +++ b/pkgs/development/python-modules/gtts/default.nix @@ -29,6 +29,9 @@ buildPythonPackage rec { build-system = [ setuptools ]; + pythonRelaxDeps = [ + "click" + ]; dependencies = [ beautifulsoup4 click @@ -53,12 +56,12 @@ buildPythonPackage rec { pythonImportsCheck = [ "gtts" ]; - meta = with lib; { + meta = { description = "Python library and CLI tool to interface with Google Translate text-to-speech API"; mainProgram = "gtts-cli"; homepage = "https://gtts.readthedocs.io"; changelog = "https://gtts.readthedocs.io/en/latest/changelog.html"; - license = licenses.mit; - maintainers = with maintainers; [ unode ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ unode ]; }; } diff --git a/pkgs/development/python-modules/mercantile/default.nix b/pkgs/development/python-modules/mercantile/default.nix index 9d8f59cbef96..0c825469ed6e 100644 --- a/pkgs/development/python-modules/mercantile/default.nix +++ b/pkgs/development/python-modules/mercantile/default.nix @@ -2,35 +2,89 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system + setuptools, + + # dependencies click, - pytestCheckHook, + + # tests hypothesis, + pytestCheckHook, + versionCheckHook, }: buildPythonPackage rec { pname = "mercantile"; version = "1.2.1"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "mapbox"; repo = "mercantile"; - rev = version; + tag = version; hash = "sha256-DiDXO2XnD3We6NhP81z7aIHzHrHDi/nkqy98OT9986w="; }; - propagatedBuildInputs = [ click ]; - - nativeCheckInputs = [ - pytestCheckHook - hypothesis + build-system = [ + setuptools ]; - meta = with lib; { + dependencies = [ + click + ]; + + nativeCheckInputs = [ + hypothesis + pytestCheckHook + versionCheckHook + ]; + versionCheckProgramArg = "--version"; + + disabledTests = [ + # AssertionError CLI exists with non-zero error code + # This is a regression introduced by https://github.com/NixOS/nixpkgs/pull/448189 + "test_cli_bounding_tile" + "test_cli_bounding_tile2" + "test_cli_bounding_tile_bbox" + "test_cli_bounding_tile_geosjon" + "test_cli_children" + "test_cli_multi_bounding_tile" + "test_cli_multi_bounding_tile_seq" + "test_cli_neighbors" + "test_cli_parent" + "test_cli_parent_depth" + "test_cli_parent_failure" + "test_cli_parent_multidepth" + "test_cli_quadkey_from_mixed" + "test_cli_quadkey_from_quadkeys" + "test_cli_quadkey_from_tiles" + "test_cli_shapes" + "test_cli_shapes_collect" + "test_cli_shapes_compact" + "test_cli_shapes_failure" + "test_cli_shapes_indentation" + "test_cli_strict_overlap_contain" + "test_cli_tiles_bad_bounds" + "test_cli_tiles_bounding_tiles_seq" + "test_cli_tiles_bounding_tiles_z0" + "test_cli_tiles_geosjon" + "test_cli_tiles_implicit_stdin" + "test_cli_tiles_multi_bounds" + "test_cli_tiles_multi_bounds_seq" + "test_cli_tiles_no_bounds" + "test_cli_tiles_point_geojson" + "test_cli_tiles_points" + "test_cli_tiles_seq" + ]; + + meta = { description = "Spherical mercator tile and coordinate utilities"; mainProgram = "mercantile"; homepage = "https://github.com/mapbox/mercantile"; - license = licenses.bsd3; - maintainers = with maintainers; [ sikmir ]; + changelog = "https://github.com/mapbox/mercantile/blob/${version}/CHANGES.txt"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ sikmir ]; }; } diff --git a/pkgs/development/python-modules/morecantile/default.nix b/pkgs/development/python-modules/morecantile/default.nix index c5e29eecfd02..e9f4650acb18 100644 --- a/pkgs/development/python-modules/morecantile/default.nix +++ b/pkgs/development/python-modules/morecantile/default.nix @@ -3,23 +3,27 @@ stdenv, buildPythonPackage, fetchFromGitHub, - pytestCheckHook, - pythonOlder, + # build-system + flit, + + # dependencies attrs, click, - flit, - mercantile, pydantic, pyproj, + + # tests + mercantile, rasterio, + pytestCheckHook, + versionCheckHook, }: buildPythonPackage rec { pname = "morecantile"; version = "6.2.0"; pyproject = true; - disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "developmentseed"; @@ -28,9 +32,9 @@ buildPythonPackage rec { hash = "sha256-ohTSgkjgaANS/Pli4fao+THA4ltts6svj5CdJEgorz0="; }; - nativeBuildInputs = [ flit ]; + build-system = [ flit ]; - propagatedBuildInputs = [ + dependencies = [ attrs click pydantic @@ -41,9 +45,26 @@ buildPythonPackage rec { mercantile pytestCheckHook rasterio + versionCheckHook ]; + versionCheckProgramArg = "--version"; - disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ + disabledTests = [ + # AssertionError CLI exists with non-zero error code + # This is a regression introduced by https://github.com/NixOS/nixpkgs/pull/448189 + "test_cli_shapes" + "test_cli_shapesWGS84" + "test_cli_strict_overlap_contain" + "test_cli_tiles_bad_bounds" + "test_cli_tiles_geosjon" + "test_cli_tiles_implicit_stdin" + "test_cli_tiles_multi_bounds" + "test_cli_tiles_multi_bounds_seq" + "test_cli_tiles_ok" + "test_cli_tiles_points" + "test_cli_tiles_seq" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ # https://github.com/developmentseed/morecantile/issues/156 "test_tiles_when_tms_bounds_and_provided_bounds_cross_antimeridian" ]; @@ -52,7 +73,9 @@ buildPythonPackage rec { meta = { description = "Construct and use map tile grids in different projection"; - homepage = "https://developmentseed.org/morecantile/"; + homepage = "https://developmentseed.org/morecantile"; + downloadPage = "https://github.com/developmentseed/morecantile"; + changelog = "https://github.com/developmentseed/morecantile/releases/tag/${src.tag}"; license = lib.licenses.mit; teams = [ lib.teams.geospatial ]; mainProgram = "morecantile"; diff --git a/pkgs/development/python-modules/rasterio/default.nix b/pkgs/development/python-modules/rasterio/default.nix index 9fc55c214146..53c1513e2c9d 100644 --- a/pkgs/development/python-modules/rasterio/default.nix +++ b/pkgs/development/python-modules/rasterio/default.nix @@ -1,42 +1,43 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, - pytestCheckHook, - pythonOlder, - stdenv, - testers, + # build-system + cython, + gdal, + numpy, + setuptools, + + # dependencies affine, attrs, - boto3, certifi, click, click-plugins, cligj, - cython, - fsspec, - gdal, - hypothesis, + snuggs, + + # optional-dependencies ipython, matplotlib, - numpy, - packaging, - pytest-randomly, - setuptools, - shapely, - snuggs, - wheel, + boto3, - rasterio, # required to run version test + # tests + fsspec, + hypothesis, + packaging, + pytestCheckHook, + pytest-randomly, + shapely, + versionCheckHook, }: buildPythonPackage rec { pname = "rasterio"; version = "1.4.3"; - format = "pyproject"; - - disabled = pythonOlder "3.8"; + pyproject = true; src = fetchFromGitHub { owner = "rasterio"; @@ -50,15 +51,14 @@ buildPythonPackage rec { --replace-fail "cython~=3.0.2" cython ''; - nativeBuildInputs = [ + build-system = [ cython gdal numpy setuptools - wheel ]; - propagatedBuildInputs = [ + dependencies = [ affine attrs certifi @@ -83,7 +83,9 @@ buildPythonPackage rec { pytestCheckHook pytest-randomly shapely + versionCheckHook ]; + versionCheckProgramArg = "--version"; preCheck = '' rm -r rasterio # prevent importing local rasterio @@ -102,23 +104,26 @@ buildPythonPackage rec { "test_warp" "test_warpedvrt" "test_rio_warp" + + # AssertionError CLI exists with non-zero error code + # This is a regression introduced by https://github.com/NixOS/nixpkgs/pull/448189 + "test_sample_stdin" + "test_transform" + "test_transform_point" + "test_transform_point_dst_file" + "test_transform_point_multi" + "test_transform_point_src_file" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_reproject_error_propagation" ]; pythonImportsCheck = [ "rasterio" ]; - passthru.tests.version = testers.testVersion { - package = rasterio; - version = version; - command = "${rasterio}/bin/rio --version"; - }; - - meta = with lib; { + meta = { description = "Python package to read and write geospatial raster data"; mainProgram = "rio"; homepage = "https://rasterio.readthedocs.io/"; changelog = "https://github.com/rasterio/rasterio/blob/${version}/CHANGES.txt"; - license = licenses.bsd3; - teams = [ teams.geospatial ]; + license = lib.licenses.bsd3; + teams = [ lib.teams.geospatial ]; }; }