2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-09-25 04:45:31 +00:00
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
2024-04-21 15:54:59 +00:00
|
|
|
, fetchpatch
|
2023-11-16 04:20:00 +00:00
|
|
|
, dask
|
2020-09-25 04:45:31 +00:00
|
|
|
, urllib3
|
2020-12-25 13:55:36 +00:00
|
|
|
, geojson
|
2024-04-21 15:54:59 +00:00
|
|
|
, verlib2
|
|
|
|
, pueblo
|
2023-11-16 04:20:00 +00:00
|
|
|
, pandas
|
2023-03-08 16:32:21 +00:00
|
|
|
, pythonOlder
|
2020-09-25 04:45:31 +00:00
|
|
|
, sqlalchemy
|
|
|
|
, pytestCheckHook
|
2023-01-20 10:41:00 +00:00
|
|
|
, pytz
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "crate";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.35.2";
|
2023-03-08 16:32:21 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-4hGACtsK71hvcn8L9ggID7zR+umtTwvskBxSHBpLyME=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
|
|
|
# Fix a pandas issue https://github.com/crate/crate-python/commit/db7ba4d0e1f4f4087739a8f9ebe1d71946333979
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/crate/crate-python/commit/db7ba4d0e1f4f4087739a8f9ebe1d71946333979.patch";
|
|
|
|
hash = "sha256-20g8T0t5gPMbK6kRJ2bzc4BNbB1Dg4hvngXNUPvxi5I=";
|
|
|
|
name = "python-crate-fix-pandas-error.patch";
|
|
|
|
# Patch doesn't apply due to other changes to these files
|
|
|
|
excludes = [
|
|
|
|
"setup.py"
|
|
|
|
"docs/by-example/sqlalchemy/dataframe.rst"
|
|
|
|
];
|
|
|
|
})
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
urllib3
|
2020-12-25 13:55:36 +00:00
|
|
|
sqlalchemy
|
|
|
|
geojson
|
2024-04-21 15:54:59 +00:00
|
|
|
verlib2
|
|
|
|
pueblo
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
dask
|
|
|
|
pandas
|
2020-09-25 04:45:31 +00:00
|
|
|
pytestCheckHook
|
2023-01-20 10:41:00 +00:00
|
|
|
pytz
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTests = [
|
2023-03-08 16:32:21 +00:00
|
|
|
# the following tests require network access
|
2022-08-12 12:06:08 +00:00
|
|
|
"test_layer_from_uri"
|
2023-03-08 16:32:21 +00:00
|
|
|
"test_additional_settings"
|
|
|
|
"test_basic"
|
|
|
|
"test_cluster"
|
|
|
|
"test_default_settings"
|
|
|
|
"test_dynamic_http_port"
|
|
|
|
"test_environment_variables"
|
|
|
|
"test_verbosity"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# imports setuptools.ssl_support, which doesn't exist anymore
|
|
|
|
"src/crate/client/test_http.py"
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://github.com/crate/crate-python";
|
|
|
|
description = "A Python client library for CrateDB";
|
2023-03-08 16:32:21 +00:00
|
|
|
changelog = "https://github.com/crate/crate-python/blob/${version}/CHANGES.txt";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
|
|
};
|
|
|
|
}
|