2020-04-24 23:36:52 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, isPy27
|
|
|
|
, 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";
|
2020-11-03 02:18:15 +00:00
|
|
|
version = "2.3.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-03 02:18:15 +00:00
|
|
|
sha256 = "5a072ee61ef156e5938e04447f0b99248b87ef262e498b5e5002f5b579cd7fb2";
|
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
|
|
|
|
] ++ lib.optionals (!isPy3k) [
|
|
|
|
pyarrow
|
|
|
|
pyasn1-modules
|
|
|
|
urllib3
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2020-10-19 00:13:06 +00:00
|
|
|
--replace "'boto3>=1.4.4,<1.15'," "'boto3~=1.15'," \
|
2020-10-07 09:15:18 +00:00
|
|
|
--replace "'cryptography>=2.5.0,<3.0.0'," "'cryptography'," \
|
|
|
|
--replace "'idna<2.10'," "'idna'," \
|
|
|
|
--replace "'requests<2.24.0'," "'requests',"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-10-19 00:13:06 +00:00
|
|
|
# tests require encrypted secrets, see
|
|
|
|
# https://github.com/snowflakedb/snowflake-connector-python/tree/master/.github/workflows/parameters
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
2020-10-07 09:15:18 +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;
|
|
|
|
};
|
|
|
|
}
|