about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/geoalchemy2/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-16 12:53:32 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-16 12:53:32 +0100
commit67419f0e56f99b0ebbe14574d3492110ac84c8d6 (patch)
tree3abc8e1606a2c80b6f5d14fef175e50800202163 /nixpkgs/pkgs/development/python-modules/geoalchemy2/default.nix
parenta2c1eff83c3118a9aee8076c7f84f58137416b6e (diff)
parent9008bc4eb62c878d0812105ea1b34255d651df88 (diff)
downloadnixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.gz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.bz2
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.lz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.xz
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.tar.zst
nixlib-67419f0e56f99b0ebbe14574d3492110ac84c8d6.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs into HEAD
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/geoalchemy2/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/geoalchemy2/default.nix47
1 files changed, 27 insertions, 20 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/geoalchemy2/default.nix b/nixpkgs/pkgs/development/python-modules/geoalchemy2/default.nix
index c29d6d4bec09..53e1544ed018 100644
--- a/nixpkgs/pkgs/development/python-modules/geoalchemy2/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/geoalchemy2/default.nix
@@ -1,71 +1,78 @@
 { lib
 , buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
 , packaging
+, setuptools
 , setuptools-scm
 , shapely
 , sqlalchemy
 , alembic
-, psycopg2
 , pytestCheckHook
 , pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "geoalchemy2";
-  version = "0.14.1";
-  format = "setuptools";
+  version = "0.14.2";
+  pyproject = true;
 
   disabled = pythonOlder "3.7";
 
-  src = fetchPypi {
-    pname = "GeoAlchemy2";
-    inherit version;
-    hash = "sha256-Ygsxy/l6NoskhtvPzTbaIIGCfpM9QWO8uUIEO3m1Reg=";
+  src = fetchFromGitHub {
+    owner = "geoalchemy";
+    repo = "geoalchemy2";
+    rev = "refs/tags/${version}";
+    hash = "sha256-C/F1hpL2DnzC4UPAGGFntlQlULCx5Ufzkw7EIrzRV7I=";
   };
 
   nativeBuildInputs = [
+    setuptools
     setuptools-scm
   ];
 
   propagatedBuildInputs = [
-    packaging
-    shapely
     sqlalchemy
+    packaging
   ];
 
   nativeCheckInputs = [
     alembic
-    psycopg2
     pytestCheckHook
-  ];
+  ] ++ passthru.optional-dependencies.shapely;
 
-  pytestFlagsArray = [
-    # tests require live postgis database
-    "--deselect=tests/test_pickle.py::TestPickle::test_pickle_unpickle"
-    "--deselect=tests/gallery/test_specific_compilation.py::test_specific_compilation"
-  ];
+  env = {
+    SETUPTOOLS_SCM_PRETEND_VERSION = version;
+  };
 
   disabledTestPaths = [
-    # tests require live postgis database
+    # tests require live databases
     "tests/gallery/test_decipher_raster.py"
     "tests/gallery/test_length_at_insert.py"
+    "tests/gallery/test_insert_raster.py"
+    "tests/gallery/test_orm_mapped_v2.py"
+    "tests/gallery/test_specific_compilation.py"
     "tests/gallery/test_summarystatsagg.py"
     "tests/gallery/test_type_decorator.py"
     "tests/test_functional.py"
     "tests/test_functional_postgresql.py"
+    "tests/test_functional_mysql.py"
     "tests/test_alembic_migrations.py"
+    "tests/test_pickle.py"
   ];
 
   pythonImportsCheck = [
     "geoalchemy2"
   ];
 
+  passthru.optional-dependencies = {
+    shapely = [ shapely ];
+  };
+
   meta = with lib; {
     description = "Toolkit for working with spatial databases";
-    homepage =  "https://geoalchemy-2.readthedocs.io/";
+    homepage = "https://geoalchemy-2.readthedocs.io/";
     changelog = "https://github.com/geoalchemy/geoalchemy2/releases/tag/${version}";
     license = licenses.mit;
-    maintainers = with maintainers; [ ];
+    maintainers = with maintainers; [ nickcao ];
   };
 }