Merge pull request #249835 from MrMebelMan/init/tabcmd

python3Packages.tabcmd: init at 2.0.12, python3Packages.pyinstaller-versionfile: init at 2.1.1, python3Packages.tableauserverclient: init at 0.25, python3Packages.types-appdirs: init at 1.4.3.5, python3Packages.types-mock: init at 5.1.0.1
This commit is contained in:
Pavol Rusnak 2023-08-23 09:50:25 +02:00 committed by GitHub
commit d8cab13436
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 183 additions and 0 deletions

View File

@ -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; [ ];
};
}

View File

@ -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; [ ];
};
}

View File

@ -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; [ ];
};
}

View File

@ -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; [ ];
};
}

View File

@ -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; [ ];
};
}

View File

@ -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 { };