From c15c6ddb103475de90e10cfc31975320f2a25859 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 5 Apr 2024 07:09:34 +0000 Subject: [PATCH 1/3] python312Packages.snowflake-connector-python: 3.7.1 -> 3.8.0 --- .../python-modules/snowflake-connector-python/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/snowflake-connector-python/default.nix b/pkgs/development/python-modules/snowflake-connector-python/default.nix index 085c21bfb59b..1cab79f2f0de 100644 --- a/pkgs/development/python-modules/snowflake-connector-python/default.nix +++ b/pkgs/development/python-modules/snowflake-connector-python/default.nix @@ -27,14 +27,14 @@ buildPythonPackage rec { pname = "snowflake-connector-python"; - version = "3.7.1"; + version = "3.8.0"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-3GmC9lOGDt7xYUowR6FrywfiJ3Xm4JCAi79PdinEGR0="; + hash = "sha256-tbXoXQK0NIofLWxn30gpqjOHlnsBM9K3+jHRkNBgnDE="; }; # snowflake-connector-python requires arrow 10.0.1, which we don't have in From 4d9010c2a5b3ca7ebd9d4df1966e097deffbc606 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Apr 2024 10:26:36 +0200 Subject: [PATCH 2/3] python312Packages.snowflake-connector-python: refactor --- .../snowflake-connector-python/default.nix | 41 +++++++------------ 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/pkgs/development/python-modules/snowflake-connector-python/default.nix b/pkgs/development/python-modules/snowflake-connector-python/default.nix index 1cab79f2f0de..beabc333f26f 100644 --- a/pkgs/development/python-modules/snowflake-connector-python/default.nix +++ b/pkgs/development/python-modules/snowflake-connector-python/default.nix @@ -1,21 +1,24 @@ { lib , asn1crypto , buildPythonPackage -, pythonRelaxDepsHook , certifi , cffi , charset-normalizer +, cython , fetchPypi , filelock , idna , keyring , oscrypto , packaging +, pandas , platformdirs +, pyarrow , pycryptodomex , pyjwt , pyopenssl , pythonOlder +, pythonRelaxDepsHook , pytz , requests , setuptools @@ -28,43 +31,26 @@ buildPythonPackage rec { pname = "snowflake-connector-python"; version = "3.8.0"; - format = "pyproject"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; hash = "sha256-tbXoXQK0NIofLWxn30gpqjOHlnsBM9K3+jHRkNBgnDE="; }; - # snowflake-connector-python requires arrow 10.0.1, which we don't have in - # nixpkgs, so we cannot build the C extensions that use it. thus, patch out - # cython and pyarrow from the build dependencies - # - # keep an eye on following issue for improvements to this situation: - # - # https://github.com/snowflakedb/snowflake-connector-python/issues/1144 - # - postPatch = '' - substituteInPlace pyproject.toml \ - --replace '"cython",' "" \ - --replace '"pyarrow>=10.0.1,<10.1.0",' "" - ''; - - nativeBuildInputs = [ - pythonRelaxDepsHook + build-system = [ + cython setuptools wheel ]; - pythonRelaxDeps = [ - "pyOpenSSL" - "charset-normalizer" - "cryptography" - "platformdirs" + nativeBuildInputs = [ + pythonRelaxDepsHook ]; - propagatedBuildInputs = [ + dependencies = [ asn1crypto certifi cffi @@ -85,6 +71,7 @@ buildPythonPackage rec { ]; passthru.optional-dependencies = { + pandas = [ pandas pyarrow ]; secure-local-storage = [ keyring ]; }; @@ -98,10 +85,10 @@ buildPythonPackage rec { ]; meta = with lib; { - changelog = "https://github.com/snowflakedb/snowflake-connector-python/blob/v${version}/DESCRIPTION.md"; description = "Snowflake Connector for Python"; homepage = "https://github.com/snowflakedb/snowflake-connector-python"; + changelog = "https://github.com/snowflakedb/snowflake-connector-python/blob/v${version}/DESCRIPTION.md"; license = licenses.asl20; maintainers = with maintainers; [ ]; }; -} +} \ No newline at end of file From 581f195dfa026a5c44ef524ecccb5dcbf817bb9e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Apr 2024 10:28:00 +0200 Subject: [PATCH 3/3] python312Packages.snowflake-connector-python: format with nixfmt --- .../snowflake-connector-python/default.nix | 68 ++++++++++--------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/pkgs/development/python-modules/snowflake-connector-python/default.nix b/pkgs/development/python-modules/snowflake-connector-python/default.nix index beabc333f26f..20eeba3c7414 100644 --- a/pkgs/development/python-modules/snowflake-connector-python/default.nix +++ b/pkgs/development/python-modules/snowflake-connector-python/default.nix @@ -1,31 +1,32 @@ -{ lib -, asn1crypto -, buildPythonPackage -, certifi -, cffi -, charset-normalizer -, cython -, fetchPypi -, filelock -, idna -, keyring -, oscrypto -, packaging -, pandas -, platformdirs -, pyarrow -, pycryptodomex -, pyjwt -, pyopenssl -, pythonOlder -, pythonRelaxDepsHook -, pytz -, requests -, setuptools -, sortedcontainers -, tomlkit -, typing-extensions -, wheel +{ + lib, + asn1crypto, + buildPythonPackage, + certifi, + cffi, + charset-normalizer, + cython, + fetchPypi, + filelock, + idna, + keyring, + oscrypto, + packaging, + pandas, + platformdirs, + pyarrow, + pycryptodomex, + pyjwt, + pyopenssl, + pythonOlder, + pythonRelaxDepsHook, + pytz, + requests, + setuptools, + sortedcontainers, + tomlkit, + typing-extensions, + wheel, }: buildPythonPackage rec { @@ -46,9 +47,7 @@ buildPythonPackage rec { wheel ]; - nativeBuildInputs = [ - pythonRelaxDepsHook - ]; + nativeBuildInputs = [ pythonRelaxDepsHook ]; dependencies = [ asn1crypto @@ -71,7 +70,10 @@ buildPythonPackage rec { ]; passthru.optional-dependencies = { - pandas = [ pandas pyarrow ]; + pandas = [ + pandas + pyarrow + ]; secure-local-storage = [ keyring ]; }; @@ -91,4 +93,4 @@ buildPythonPackage rec { license = licenses.asl20; maintainers = with maintainers; [ ]; }; -} \ No newline at end of file +}