1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, packaging 5, setuptools 6, setuptools-scm 7, shapely 8, sqlalchemy 9, alembic 10, pytestCheckHook 11, pythonOlder 12}: 13 14buildPythonPackage rec { 15 pname = "geoalchemy2"; 16 version = "0.14.2"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "geoalchemy"; 23 repo = "geoalchemy2"; 24 rev = "refs/tags/${version}"; 25 hash = "sha256-C/F1hpL2DnzC4UPAGGFntlQlULCx5Ufzkw7EIrzRV7I="; 26 }; 27 28 nativeBuildInputs = [ 29 setuptools 30 setuptools-scm 31 ]; 32 33 propagatedBuildInputs = [ 34 sqlalchemy 35 packaging 36 ]; 37 38 nativeCheckInputs = [ 39 alembic 40 pytestCheckHook 41 ] ++ passthru.optional-dependencies.shapely; 42 43 env = { 44 SETUPTOOLS_SCM_PRETEND_VERSION = version; 45 }; 46 47 disabledTestPaths = [ 48 # tests require live databases 49 "tests/gallery/test_decipher_raster.py" 50 "tests/gallery/test_length_at_insert.py" 51 "tests/gallery/test_insert_raster.py" 52 "tests/gallery/test_orm_mapped_v2.py" 53 "tests/gallery/test_specific_compilation.py" 54 "tests/gallery/test_summarystatsagg.py" 55 "tests/gallery/test_type_decorator.py" 56 "tests/test_functional.py" 57 "tests/test_functional_postgresql.py" 58 "tests/test_functional_mysql.py" 59 "tests/test_alembic_migrations.py" 60 "tests/test_pickle.py" 61 ]; 62 63 pythonImportsCheck = [ 64 "geoalchemy2" 65 ]; 66 67 passthru.optional-dependencies = { 68 shapely = [ shapely ]; 69 }; 70 71 meta = with lib; { 72 description = "Toolkit for working with spatial databases"; 73 homepage = "https://geoalchemy-2.readthedocs.io/"; 74 changelog = "https://github.com/geoalchemy/geoalchemy2/releases/tag/${version}"; 75 license = licenses.mit; 76 maintainers = with maintainers; [ nickcao ]; 77 }; 78}