2019-07-17 02:14:38 +01:00
|
|
|
{ buildPythonPackage
|
2020-02-13 06:42:15 +00:00
|
|
|
, isPy27
|
2019-07-17 02:14:38 +01:00
|
|
|
, asn1crypto
|
|
|
|
, azure-storage-blob
|
|
|
|
, boto3
|
|
|
|
, certifi
|
|
|
|
, cffi
|
|
|
|
, fetchPypi
|
|
|
|
, future
|
|
|
|
, idna
|
|
|
|
, ijson
|
|
|
|
, isPy3k
|
|
|
|
, lib
|
|
|
|
, oscrypto
|
|
|
|
, pyarrow
|
|
|
|
, pyasn1-modules
|
|
|
|
, pycryptodomex
|
|
|
|
, pyjwt
|
|
|
|
, pyopenssl
|
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
, six
|
|
|
|
, urllib3
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "snowflake-connector-python";
|
2021-03-24 09:28:28 +00:00
|
|
|
version = "2.4.1";
|
2020-02-13 06:42:15 +00:00
|
|
|
disabled = isPy27;
|
2019-07-17 02:14:38 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-24 09:28:28 +00:00
|
|
|
sha256 = "5c9180e61202a7beb1df83231688423091ca0a04ee559d2a78ff77f9c727baae";
|
2019-07-17 02:14:38 +01:00
|
|
|
};
|
|
|
|
|
2021-03-08 20:37:14 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pyOpenSSL>=16.2.0,<20.0.0'," "'pyOpenSSL'," \
|
|
|
|
--replace 'pytz<2021.0' 'pytz'
|
|
|
|
'';
|
|
|
|
|
2019-07-17 02:14:38 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
azure-storage-blob
|
|
|
|
asn1crypto
|
|
|
|
boto3
|
|
|
|
certifi
|
|
|
|
cffi
|
|
|
|
future
|
|
|
|
idna
|
|
|
|
ijson
|
|
|
|
oscrypto
|
|
|
|
pycryptodomex
|
|
|
|
pyjwt
|
|
|
|
pyopenssl
|
|
|
|
pytz
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
] ++ lib.optionals (!isPy3k) [
|
|
|
|
pyarrow
|
|
|
|
pyasn1-modules
|
|
|
|
urllib3
|
|
|
|
];
|
|
|
|
|
2020-10-17 02:20:58 +01:00
|
|
|
# tests require encrypted secrets, see
|
|
|
|
# https://github.com/snowflakedb/snowflake-connector-python/tree/master/.github/workflows/parameters
|
2019-07-17 02:14:38 +01:00
|
|
|
doCheck = false;
|
2020-09-26 15:35:46 +01:00
|
|
|
pythonImportsCheck = [ "snowflake" "snowflake.connector" ];
|
2019-07-17 02:14:38 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Snowflake Connector for Python";
|
|
|
|
homepage = "https://www.snowflake.com/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|