2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, asn1crypto
|
|
|
|
, azure-storage-blob
|
|
|
|
, boto3
|
|
|
|
, certifi
|
|
|
|
, cffi
|
|
|
|
, fetchPypi
|
|
|
|
, future
|
|
|
|
, idna
|
|
|
|
, ijson
|
|
|
|
, isPy3k
|
|
|
|
, oscrypto
|
|
|
|
, pyarrow
|
|
|
|
, pyasn1-modules
|
|
|
|
, pycryptodomex
|
|
|
|
, pyjwt
|
|
|
|
, pyopenssl
|
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, urllib3
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "snowflake-connector-python";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "2.4.3";
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "sha256-+jAfUwaofWM5Ef1kk4AEAbBM/UES8/ZzLd4QJfkEQsM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
azure-storage-blob
|
|
|
|
asn1crypto
|
|
|
|
boto3
|
|
|
|
certifi
|
|
|
|
cffi
|
|
|
|
future
|
|
|
|
idna
|
|
|
|
ijson
|
|
|
|
oscrypto
|
|
|
|
pycryptodomex
|
|
|
|
pyjwt
|
|
|
|
pyopenssl
|
|
|
|
pytz
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
pyarrow
|
|
|
|
pyasn1-modules
|
|
|
|
urllib3
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/snowflakedb/snowflake-connector-python/issues/705
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "idna>=2.5,<3" "idna" \
|
|
|
|
--replace "chardet>=3.0.2,<4" "chardet"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Tests require encrypted secrets, see
|
2020-10-19 00:13:06 +00:00
|
|
|
# https://github.com/snowflakedb/snowflake-connector-python/tree/master/.github/workflows/parameters
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"snowflake"
|
|
|
|
"snowflake.connector"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Snowflake Connector for Python";
|
|
|
|
homepage = "https://www.snowflake.com/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|