diff --git a/pkgs/development/python-modules/pyinstaller-versionfile/default.nix b/pkgs/development/python-modules/pyinstaller-versionfile/default.nix new file mode 100644 index 000000000000..85ab4112e5ea --- /dev/null +++ b/pkgs/development/python-modules/pyinstaller-versionfile/default.nix @@ -0,0 +1,30 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, packaging +, jinja2 +, pyyaml +}: + +buildPythonPackage rec { + pname = "pyinstaller-versionfile"; + version = "2.1.1"; + + format = "setuptools"; + + src = fetchFromGitHub { + owner = "DudeNr33"; + repo = pname; + rev = "v${version}"; + hash = "sha256-lz1GuiXU+r8sMld5SsG3qS+FOsWfbvkQmO2bxAR3XcY="; + }; + + propagatedBuildInputs = [ packaging jinja2 pyyaml ]; + + meta = { + description = "Create a windows version-file from a simple YAML file that can be used by PyInstaller."; + homepage = "https://pypi.org/project/pyinstaller-versionfile/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/python-modules/tabcmd/default.nix b/pkgs/development/python-modules/tabcmd/default.nix new file mode 100644 index 000000000000..0569b2e661c3 --- /dev/null +++ b/pkgs/development/python-modules/tabcmd/default.nix @@ -0,0 +1,66 @@ +{ lib +, buildPythonPackage +, python3 +, pythonOlder +, fetchPypi +, ftfy +, appdirs +, requests +, setuptools-scm +, types-mock +, types-appdirs +, types-requests +, types-setuptools +, argparse +, doit +, pyinstaller-versionfile +, tableauserverclient +, pytestCheckHook +, mock +}: + +buildPythonPackage rec { + pname = "tabcmd"; + version = "2.0.12"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-nsQJWDzSzSc1WRk5TBl/E7Mpfk8wGD1CsETAWILKxCM="; + }; + + propagatedBuildInputs = [ ftfy appdirs requests setuptools-scm types-mock types-appdirs argparse doit pyinstaller-versionfile types-requests types-setuptools tableauserverclient ]; + + nativeCheckInputs = [ pytestCheckHook mock ]; + + # Remove an unneeded dependency that can't be resolved + prePatch = '' + sed -i "/'argparse',/d" pyproject.toml + ''; + + # Create a "tabcmd" executable + postInstall = '' + # Create a directory for our wrapped binary. + mkdir -p $out/bin + + cp -r build/lib/tabcmd/__main__.py $out/bin/ + + # Create a 'tabcmd' script with python3 shebang + echo "#!${python3}/bin/python3" > $out/bin/tabcmd + + # Append __main__.py contents + cat $out/bin/__main__.py >> $out/bin/tabcmd + + # Make it executable. + chmod +x $out/bin/tabcmd + ''; + + + meta = { + description = "A command line client for working with Tableau Server."; + homepage = "https://pypi.org/project/tabcmd/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/python-modules/tableauserverclient/default.nix b/pkgs/development/python-modules/tableauserverclient/default.nix new file mode 100644 index 000000000000..601fdee70310 --- /dev/null +++ b/pkgs/development/python-modules/tableauserverclient/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, python +, fetchPypi +, defusedxml +, requests +, packaging +, requests-mock +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "tableauserverclient"; + version = "0.25"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-01TRYkXEWagFrSB7zvP6Bj4YvIFoaVkgrIm/gSWkILY="; + }; + + propagatedBuildInputs = [ defusedxml requests packaging ]; + + checkInputs = [ requests-mock ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + doCheck = false; # it attempts to create some file artifacts and fails + + meta = { + description = "A Python module for working with the Tableau Server REST API."; + homepage = "https://pypi.org/project/tableauserverclient/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/python-modules/types-appdirs/default.nix b/pkgs/development/python-modules/types-appdirs/default.nix new file mode 100644 index 000000000000..7d316400a041 --- /dev/null +++ b/pkgs/development/python-modules/types-appdirs/default.nix @@ -0,0 +1,21 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "types-appdirs"; + version = "1.4.3.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-gyaNpkWFNhv6KR+PUGogknYhKgSXvTfwUSqTmz1p/xQ="; + }; + + meta = { + description = "This is a PEP 561 type stub package for the appdirs package. It can be used by type-checking tools like mypy, pyright, pytype, PyCharm, etc. to check code that uses appdirs. "; + homepage = "https://pypi.org/project/types-appdirss"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/python-modules/types-mock/default.nix b/pkgs/development/python-modules/types-mock/default.nix new file mode 100644 index 000000000000..f072c83916cc --- /dev/null +++ b/pkgs/development/python-modules/types-mock/default.nix @@ -0,0 +1,21 @@ +{ lib +, buildPythonPackage +, fetchPypi +}: + +buildPythonPackage rec { + pname = "types-mock"; + version = "5.1.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-8H1Z3lDqgWq0A7pOJG/4CwCSY7N3vD93Tf3r8LQD+2A="; + }; + + meta = { + description = "This is a PEP 561 type stub package for the mock package. It can be used by type-checking tools like mypy, pyright, pytype, PyCharm, etc. to check code that uses mock."; + homepage = "https://pypi.org/project/types-mock"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 28f2118aa08b..8f6dc2117ac8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8132,6 +8132,8 @@ self: super: with self; { pyhumps = callPackage ../development/python-modules/pyhumps { }; + pyinstaller-versionfile = callPackage ../development/python-modules/pyinstaller-versionfile { }; + pyisy = callPackage ../development/python-modules/pyisy { }; pykrakenapi = callPackage ../development/python-modules/pykrakenapi { }; @@ -12406,8 +12408,12 @@ self: super: with self; { syrupy = callPackage ../development/python-modules/syrupy { }; + tabcmd = callPackage ../development/python-modules/tabcmd { }; + tableaudocumentapi = callPackage ../development/python-modules/tableaudocumentapi { }; + tableauserverclient = callPackage ../development/python-modules/tableauserverclient { }; + tabledata = callPackage ../development/python-modules/tabledata { }; tables = callPackage ../development/python-modules/tables { }; @@ -13078,6 +13084,8 @@ self: super: with self; { typer = callPackage ../development/python-modules/typer { }; + types-appdirs = callPackage ../development/python-modules/types-appdirs { }; + types-colorama = callPackage ../development/python-modules/types-colorama { }; types-dateutil = callPackage ../development/python-modules/types-dateutil { }; @@ -13096,6 +13104,8 @@ self: super: with self; { types-ipaddress = callPackage ../development/python-modules/types-ipaddress { }; + types-mock = callPackage ../development/python-modules/types-mock { }; + types-pillow = callPackage ../development/python-modules/types-pillow { }; types-protobuf = callPackage ../development/python-modules/types-protobuf { };