2019-07-16 18:14:38 -07:00
|
|
|
{ buildPythonPackage
|
2020-02-12 22:42:15 -08:00
|
|
|
, isPy27
|
2019-07-16 18:14:38 -07: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";
|
2020-11-20 16:32:00 -08:00
|
|
|
version = "2.3.6";
|
2020-02-12 22:42:15 -08:00
|
|
|
disabled = isPy27;
|
2019-07-16 18:14:38 -07:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-20 16:32:00 -08:00
|
|
|
sha256 = "1a4ebf25989fc13d6f70dc3e2064721c54834e493a7964a1d67be61d40e75f50";
|
2019-07-16 18:14:38 -07: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-03-18 13:25:27 -07:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2020-11-27 01:42:23 -08:00
|
|
|
--replace "'boto3>=1.4.4,<1.16'," "'boto3~=1.16'," \
|
2020-09-26 07:35:46 -07:00
|
|
|
--replace "'cryptography>=2.5.0,<3.0.0'," "'cryptography'," \
|
|
|
|
--replace "'idna<2.10'," "'idna'," \
|
|
|
|
--replace "'requests<2.24.0'," "'requests',"
|
2020-03-18 13:25:27 -07:00
|
|
|
'';
|
|
|
|
|
2020-10-16 18:20:58 -07:00
|
|
|
# tests require encrypted secrets, see
|
|
|
|
# https://github.com/snowflakedb/snowflake-connector-python/tree/master/.github/workflows/parameters
|
2019-07-16 18:14:38 -07:00
|
|
|
doCheck = false;
|
2020-09-26 07:35:46 -07:00
|
|
|
pythonImportsCheck = [ "snowflake" "snowflake.connector" ];
|
2019-07-16 18:14:38 -07:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Snowflake Connector for Python";
|
|
|
|
homepage = "https://www.snowflake.com/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|