diff --git a/pkgs/development/python-modules/siuba/default.nix b/pkgs/development/python-modules/siuba/default.nix new file mode 100644 index 000000000000..97d90cac25ae --- /dev/null +++ b/pkgs/development/python-modules/siuba/default.nix @@ -0,0 +1,62 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, hypothesis +, numpy +, pandas +, psycopg2 +, pymysql +, python-dateutil +, pytz +, pyyaml +, six +, sqlalchemy +}: + +buildPythonPackage rec { + pname = "siuba"; + version = "0.4.2"; + disabled = pythonOlder "3.7"; + + format = "setuptools"; + + src = fetchFromGitHub { + owner = "machow"; + repo = "siuba"; + rev = "refs/tags/v${version}"; + hash = "sha256-Q2nkK51bmIO2OcBuWu+u7yB8UmaqiZJXpuxXcytTlUY="; + }; + + propagatedBuildInputs = [ + numpy + pandas + psycopg2 + pymysql + python-dateutil + pytz + pyyaml + six + sqlalchemy + ]; + + checkInputs = [ + hypothesis + pytestCheckHook + ]; + doCheck = false; + # requires running mysql and postgres instances; see docker-compose.yml + + pythonImportsCheck = [ + "siuba" + "siuba.data" + ]; + + meta = with lib; { + description = "Use dplyr-like syntax with pandas and SQL"; + homepage = "https://siuba.org"; + license = licenses.mit; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8ce5080662a8..43a5fd410bd1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10507,6 +10507,8 @@ self: super: with self; { sip_4 = callPackage ../development/python-modules/sip/4.x.nix { }; + siuba = callPackage ../development/python-modules/siuba { }; + six = callPackage ../development/python-modules/six { }; sjcl = callPackage ../development/python-modules/sjcl { };