diff --git a/pkgs/development/python-modules/crate/default.nix b/pkgs/development/python-modules/crate/default.nix index fe60eceb93c8..a7e03d3ecad4 100644 --- a/pkgs/development/python-modules/crate/default.nix +++ b/pkgs/development/python-modules/crate/default.nix @@ -1,9 +1,12 @@ { lib , fetchPypi , buildPythonPackage +, fetchpatch , dask , urllib3 , geojson +, verlib2 +, pueblo , pandas , pythonOlder , sqlalchemy @@ -13,20 +16,35 @@ buildPythonPackage rec { pname = "crate"; - version = "0.34.0"; + version = "0.35.2"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-nEWrfCd2MQCcIM6dLkVYc/cWT5wcT/pvYaY2V3wfuto="; + hash = "sha256-4hGACtsK71hvcn8L9ggID7zR+umtTwvskBxSHBpLyME="; }; + patches = [ + # Fix a pandas issue https://github.com/crate/crate-python/commit/db7ba4d0e1f4f4087739a8f9ebe1d71946333979 + (fetchpatch { + url = "https://github.com/crate/crate-python/commit/db7ba4d0e1f4f4087739a8f9ebe1d71946333979.patch"; + hash = "sha256-20g8T0t5gPMbK6kRJ2bzc4BNbB1Dg4hvngXNUPvxi5I="; + name = "python-crate-fix-pandas-error.patch"; + # Patch doesn't apply due to other changes to these files + excludes = [ + "setup.py" + "docs/by-example/sqlalchemy/dataframe.rst" + ]; + }) + ]; propagatedBuildInputs = [ urllib3 sqlalchemy geojson + verlib2 + pueblo ]; nativeCheckInputs = [ diff --git a/pkgs/development/python-modules/pueblo/default.nix b/pkgs/development/python-modules/pueblo/default.nix new file mode 100644 index 000000000000..52a5a4435275 --- /dev/null +++ b/pkgs/development/python-modules/pueblo/default.nix @@ -0,0 +1,44 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools +, versioningit +, platformdirs +}: + +buildPythonPackage rec { + pname = "pueblo"; + version = "0.0.8"; + pyproject = true; + + # This tarball doesn't include tests unfortuneatly, and the GitHub tarball + # could have been an alternative, but versioningit fails to detect the + # version of it correctly, even with setuptools-scm and + # SETUPTOOLS_SCM_PRETEND_VERSION = version added. Since this is a pure Python + # package, we can rely on upstream to run the tests before releasing, and it + # should work for us as well. + src = fetchPypi { + inherit pname version; + hash = "sha256-iM8Ea2ym7ZM0wInkCZ76yUjvOPRF5MVbT4WhpWz70UU="; + }; + + nativeBuildInputs = [ + setuptools + versioningit + ]; + + propagatedBuildInputs = [ + # contextlib-chdir + # importlib-metadata + platformdirs + ]; + + pythonImportsCheck = [ "pueblo" ]; + + meta = with lib; { + description = "Pueblo - a Python toolbox library"; + homepage = "https://pypi.org/project/pueblo/"; + license = licenses.lgpl3Only; + maintainers = with maintainers; [ doronbehar ]; + }; +} diff --git a/pkgs/development/python-modules/verlib2/default.nix b/pkgs/development/python-modules/verlib2/default.nix new file mode 100644 index 000000000000..41c1d95eff25 --- /dev/null +++ b/pkgs/development/python-modules/verlib2/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools +, versioningit +}: + +buildPythonPackage rec { + pname = "verlib2"; + version = "0.2.0"; + pyproject = true; + + # This tarball doesn't include tests unfortuneatly, and the GitHub tarball + # could have been an alternative, but versioningit fails to detect the + # version of it correctly, even with setuptools-scm and + # SETUPTOOLS_SCM_PRETEND_VERSION = version added. Since this is a pure Python + # package, we can rely on upstream to run the tests before releasing, and it + # should work for us as well. + src = fetchPypi { + inherit pname version; + hash = "sha256-CrlAh8CU4nFjlI36gXyY1itr3QEibM5RiPjMPNaDRbk="; + }; + + nativeBuildInputs = [ + setuptools + versioningit + ]; + + pythonImportsCheck = [ "verlib2" ]; + + meta = with lib; { + description = "A standalone variant of packaging.version, without anything else"; + homepage = "https://pypi.org/project/verlib2/"; + license = licenses.bsd2; + maintainers = with maintainers; [ doronbehar ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 424e7a726bf1..7bc514fc7e58 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1310,6 +1310,8 @@ self: super: with self; { paddlepaddle = callPackage ../development/python-modules/paddlepaddle { }; + pueblo = callPackage ../development/python-modules/pueblo { }; + pulumi = callPackage ../development/python-modules/pulumi { inherit (pkgs) pulumi; }; pulumi-aws = callPackage ../development/python-modules/pulumi-aws { }; @@ -16144,6 +16146,8 @@ self: super: with self; { verboselogs = callPackage ../development/python-modules/verboselogs { }; + verlib2 = callPackage ../development/python-modules/verlib2 { }; + versioneer = callPackage ../development/python-modules/versioneer { }; versionfinder = callPackage ../development/python-modules/versionfinder { };