1{ lib
2, buildPythonPackage
3, fetchPypi
4, packaging
5, setuptools-scm
6, shapely
7, sqlalchemy
8, alembic
9, psycopg2
10, pytestCheckHook
11, pythonOlder
12}:
13
14buildPythonPackage rec {
15 pname = "geoalchemy2";
16 version = "0.13.3";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchPypi {
22 pname = "GeoAlchemy2";
23 inherit version;
24 hash = "sha256-2Fp96qmiMJAXM/dBnWv/VnS4cwZR3hoH8rZCOqSSXQk=";
25 };
26
27 nativeBuildInputs = [
28 setuptools-scm
29 ];
30
31 propagatedBuildInputs = [
32 packaging
33 shapely
34 sqlalchemy
35 ];
36
37 nativeCheckInputs = [
38 alembic
39 psycopg2
40 pytestCheckHook
41 ];
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 ];
48
49 disabledTestPaths = [
50 # tests require live postgis database
51 "tests/gallery/test_decipher_raster.py"
52 "tests/gallery/test_length_at_insert.py"
53 "tests/gallery/test_summarystatsagg.py"
54 "tests/gallery/test_type_decorator.py"
55 "tests/test_functional.py"
56 "tests/test_functional_postgresql.py"
57 "tests/test_alembic_migrations.py"
58 ];
59
60 pythonImportsCheck = [
61 "geoalchemy2"
62 ];
63
64 meta = with lib; {
65 description = "Toolkit for working with spatial databases";
66 homepage = "https://geoalchemy-2.readthedocs.io/";
67 changelog = "https://github.com/geoalchemy/geoalchemy2/releases/tag/${version}";
68 license = licenses.mit;
69 maintainers = with maintainers; [ ];
70 };
71}