depot/third_party/nixpkgs/pkgs/development/python-modules/snowflake-connector-python/default.nix
Default email d6cfb865ad Project import generated by Copybara.
GitOrigin-RevId: 5265d49a36bb5a18c85e6817b338b456acc3b8cc
2020-10-18 20:13:06 -04:00

76 lines
1.4 KiB
Nix

{ 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";
version = "2.3.3";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "18w6ibpibqj3v136jjfklbax1l4y80v8mfk19apxlaprf6wvwpwy";
};
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 \
--replace "'boto3>=1.4.4,<1.15'," "'boto3~=1.15'," \
--replace "'cryptography>=2.5.0,<3.0.0'," "'cryptography'," \
--replace "'idna<2.10'," "'idna'," \
--replace "'requests<2.24.0'," "'requests',"
'';
# tests require encrypted secrets, see
# https://github.com/snowflakedb/snowflake-connector-python/tree/master/.github/workflows/parameters
doCheck = false;
pythonImportsCheck = [ "snowflake" "snowflake.connector" ];
meta = with lib; {
description = "Snowflake Connector for Python";
homepage = "https://www.snowflake.com/";
license = licenses.asl20;
};
}