lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

python311Packages.geoalchemy2: modernize

authored by

Nick Cao and committed by
Jonathan Ringer
9d18a834 31359b74

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