diff --git a/pkgs/development/python-modules/cartopy/default.nix b/pkgs/development/python-modules/cartopy/default.nix index 5f7659b61346..79059c7d53f5 100644 --- a/pkgs/development/python-modules/cartopy/default.nix +++ b/pkgs/development/python-modules/cartopy/default.nix @@ -1,55 +1,50 @@ { lib, buildPythonPackage, - pythonOlder, + cython, fetchpatch, fetchPypi, - cython, - setuptools-scm, + fontconfig, + gdal, geos, - proj, matplotlib, numpy, - pyproj, - pyshp, - shapely, owslib, pillow, - gdal, - scipy, - fontconfig, + proj, + pyproj, + pyshp, pytest-mpl, pytestCheckHook, + pythonOlder, + scipy, + setuptools-scm, + shapely, }: buildPythonPackage rec { pname = "cartopy"; - version = "0.23.0"; + version = "0.24.1"; + pyproject = true; - disabled = pythonOlder "3.8"; - - format = "setuptools"; + disabled = pythonOlder "3.10"; src = fetchPypi { - inherit version; - pname = "Cartopy"; - hash = "sha256-Ix83s1cB8rox2UlZzKdebaBMLuo6fxTOHHXuOw6udnY="; + inherit pname version; + hash = "sha256-AckQ1WNMaafv3sRuChfUc9Iyh2fwAdTcC1xLSOWFyL0="; }; - patches = [ - # Some tests in the 0.23.0 release are failing due to missing network markers. Revisit after update. - (fetchpatch { - name = "mnt-add-missing-needs-network-markers.patch"; - url = "https://github.com/SciTools/cartopy/commit/2403847ea69c3d95e899ad5d0cab32ac6017df0e.patch"; - hash = "sha256-aGBUX4jFn7GgoqmHVC51DmS+ga3GcQGKfkut++x67Q0="; - }) - ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "numpy>=2.0.0rc1" "numpy" + ''; + + build-system = [ setuptools-scm ]; nativeBuildInputs = [ cython geos # for geos-config proj - setuptools-scm ]; buildInputs = [ @@ -57,7 +52,7 @@ buildPythonPackage rec { proj ]; - propagatedBuildInputs = [ + dependencies = [ matplotlib numpy pyproj @@ -101,9 +96,10 @@ buildPythonPackage rec { meta = with lib; { description = "Process geospatial data to create maps and perform analyses"; - mainProgram = "feature_download"; - license = licenses.lgpl3Plus; homepage = "https://scitools.org.uk/cartopy/docs/latest/"; + changelog = "https://github.com/SciTools/cartopy/releases/tag/v${version}"; + license = licenses.lgpl3Plus; maintainers = with maintainers; [ ]; + mainProgram = "feature_download"; }; } diff --git a/pkgs/development/python-modules/owslib/default.nix b/pkgs/development/python-modules/owslib/default.nix index 53f7f9f24e07..4d2d4f24071e 100644 --- a/pkgs/development/python-modules/owslib/default.nix +++ b/pkgs/development/python-modules/owslib/default.nix @@ -2,46 +2,48 @@ lib, buildPythonPackage, fetchFromGitHub, - lxml, - pyproj, + pytest-cov-stub, pytestCheckHook, python-dateutil, pythonOlder, - pytz, pyyaml, requests, + setuptools, }: buildPythonPackage rec { pname = "owslib"; - version = "0.31.0"; - format = "setuptools"; + version = "0.32.0"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.10"; src = fetchFromGitHub { owner = "geopython"; repo = "OWSLib"; - rev = version; - hash = "sha256-vjJsLavVOqTTrVtYbtA0G+nl0HanKeGtzNFFj92Frw8="; + rev = "refs/tags/${version}"; + hash = "sha256-q2O9FNBszNWfL1ekcohSd1RbdLFu8c+zxi+UFeQ7/mk="; }; postPatch = '' substituteInPlace tox.ini \ - --replace " --doctest-modules --doctest-glob 'tests/**/*.txt' --cov-report term-missing --cov owslib" "" + --replace-fail " --doctest-modules --doctest-glob 'tests/**/*.txt'" "" ''; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ lxml - pyproj python-dateutil - pytz pyyaml requests ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytest-cov-stub + pytestCheckHook + ]; pythonImportsCheck = [ "owslib" ]; @@ -51,10 +53,15 @@ buildPythonPackage rec { ''; pytestFlagsArray = [ - # disable tests which require network access + # Disable tests which require network access "-m 'not online'" ]; + disabledTestPaths = [ + # Tests requires network access + "tests/test_ogcapi_connectedsystems_osh.py" + ]; + meta = with lib; { description = "Client for Open Geospatial Consortium web service interface standards"; homepage = "https://www.osgeo.org/projects/owslib/";