2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, asn1crypto
|
2022-06-16 17:23:12 +00:00
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, certifi
|
|
|
|
, cffi
|
2022-06-16 17:23:12 +00:00
|
|
|
, charset-normalizer
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2022-09-30 11:47:45 +00:00
|
|
|
, filelock
|
2020-04-24 23:36:52 +00:00
|
|
|
, idna
|
|
|
|
, oscrypto
|
|
|
|
, pycryptodomex
|
|
|
|
, pyjwt
|
|
|
|
, pyopenssl
|
2022-06-16 17:23:12 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytz
|
|
|
|
, requests
|
2022-06-16 17:23:12 +00:00
|
|
|
, setuptools
|
2022-09-30 11:47:45 +00:00
|
|
|
, typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "snowflake-connector-python";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "3.0.0";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "pyproject";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-02-16 17:41:37 +00:00
|
|
|
hash = "sha256-F0EbgRSS/kYKUDPhf6euM0eLqIqVjQsHC6C9ZZSRCIE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "charset_normalizer>=2,<3" "charset_normalizer" \
|
|
|
|
--replace "pyOpenSSL>=16.2.0,<23.0.0" "pyOpenSSL"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
asn1crypto
|
|
|
|
certifi
|
|
|
|
cffi
|
2022-06-16 17:23:12 +00:00
|
|
|
charset-normalizer
|
2022-09-30 11:47:45 +00:00
|
|
|
filelock
|
2020-04-24 23:36:52 +00:00
|
|
|
idna
|
|
|
|
oscrypto
|
|
|
|
pycryptodomex
|
|
|
|
pyjwt
|
|
|
|
pyopenssl
|
|
|
|
pytz
|
|
|
|
requests
|
2022-06-16 17:23:12 +00:00
|
|
|
setuptools
|
2022-09-30 11:47:45 +00:00
|
|
|
typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# 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; {
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/snowflakedb/snowflake-connector-python/blob/v${version}/DESCRIPTION.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Snowflake Connector for Python";
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://github.com/snowflakedb/snowflake-connector-python";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2021-08-27 14:25:00 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|