nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchPypi
4, packaging
5, setuptools-scm
6, shapely
7, sqlalchemy
8, psycopg2
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "GeoAlchemy2";
14 version = "0.11.1";
15 format = "setuptools";
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "sha256-+SoPrdtbdDhNu/PHAAQzNYzo4HoYD+HWwoQ+qgQ3/wg=";
20 };
21
22 nativeBuildInputs = [
23 setuptools-scm
24 ];
25
26 propagatedBuildInputs = [
27 packaging
28 shapely
29 sqlalchemy
30 ];
31
32 checkInputs = [
33 psycopg2
34 pytestCheckHook
35 ];
36
37 pytestFlagsArray = [
38 # tests require live postgis database
39 "--deselect=tests/test_pickle.py::TestPickle::test_pickle_unpickle"
40 "--deselect=tests/gallery/test_specific_compilation.py::test_specific_compilation"
41 ];
42
43 disabledTestPaths = [
44 # tests require live postgis database
45 "tests/gallery/test_decipher_raster.py"
46 "tests/gallery/test_length_at_insert.py"
47 "tests/gallery/test_summarystatsagg.py"
48 "tests/gallery/test_type_decorator.py"
49 "tests/test_functional.py"
50 "tests/test_functional_postgresql.py"
51 ];
52
53 pythonImportsCheck = [
54 "geoalchemy2"
55 ];
56
57 meta = with lib; {
58 description = "Toolkit for working with spatial databases";
59 homepage = "http://geoalchemy.org/";
60 license = licenses.mit;
61 maintainers = with maintainers; [ ];
62 };
63
64}