Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchPypi, 4 buildPythonPackage, 5 fetchpatch, 6 dask, 7 urllib3, 8 geojson, 9 verlib2, 10 pueblo, 11 pandas, 12 pythonOlder, 13 sqlalchemy, 14 pytestCheckHook, 15 pytz, 16}: 17 18buildPythonPackage rec { 19 pname = "crate"; 20 version = "0.35.2"; 21 format = "setuptools"; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchPypi { 26 inherit pname version; 27 hash = "sha256-4hGACtsK71hvcn8L9ggID7zR+umtTwvskBxSHBpLyME="; 28 }; 29 patches = [ 30 # Fix a pandas issue https://github.com/crate/crate-python/commit/db7ba4d0e1f4f4087739a8f9ebe1d71946333979 31 (fetchpatch { 32 url = "https://github.com/crate/crate-python/commit/db7ba4d0e1f4f4087739a8f9ebe1d71946333979.patch"; 33 hash = "sha256-20g8T0t5gPMbK6kRJ2bzc4BNbB1Dg4hvngXNUPvxi5I="; 34 name = "python-crate-fix-pandas-error.patch"; 35 # Patch doesn't apply due to other changes to these files 36 excludes = [ 37 "setup.py" 38 "docs/by-example/sqlalchemy/dataframe.rst" 39 ]; 40 }) 41 ]; 42 43 propagatedBuildInputs = [ 44 urllib3 45 sqlalchemy 46 geojson 47 verlib2 48 pueblo 49 ]; 50 51 nativeCheckInputs = [ 52 dask 53 pandas 54 pytestCheckHook 55 pytz 56 ]; 57 58 disabledTests = [ 59 # the following tests require network access 60 "test_layer_from_uri" 61 "test_additional_settings" 62 "test_basic" 63 "test_cluster" 64 "test_default_settings" 65 "test_dynamic_http_port" 66 "test_environment_variables" 67 "test_verbosity" 68 ]; 69 70 disabledTestPaths = [ 71 # imports setuptools.ssl_support, which doesn't exist anymore 72 "src/crate/client/test_http.py" 73 ]; 74 75 meta = with lib; { 76 homepage = "https://github.com/crate/crate-python"; 77 description = "Python client library for CrateDB"; 78 changelog = "https://github.com/crate/crate-python/blob/${version}/CHANGES.txt"; 79 license = licenses.asl20; 80 maintainers = with maintainers; [ doronbehar ]; 81 }; 82}