From 84d74ae9c9cbed73274b8e4e00be14688ffc93fe Mon Sep 17 00:00:00 2001 From: Austin Butler Date: Sat, 26 Sep 2020 18:51:03 -0700 Subject: [PATCH] pythonPackages.entrypoint2: init at 0.2.1 --- .../python-modules/entrypoint2/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/entrypoint2/default.nix diff --git a/pkgs/development/python-modules/entrypoint2/default.nix b/pkgs/development/python-modules/entrypoint2/default.nix new file mode 100644 index 000000000000..301de3e278f3 --- /dev/null +++ b/pkgs/development/python-modules/entrypoint2/default.nix @@ -0,0 +1,36 @@ +{ lib, buildPythonPackage, fetchPypi, EasyProcess, pathpy, pytest }: + +buildPythonPackage rec { + pname = "entrypoint2"; + version = "0.2.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "15dya04884armqjdyqz1jgachkqgh9dc3p25lvyz9afvg73k2qav"; + }; + + propagatedBuildInputs = [ ]; + + pythonImportsCheck = [ "entrypoint2" ]; + + # argparse is part of the standardlib + prePatch = '' + substituteInPlace setup.py --replace "argparse" "" + ''; + + checkInputs = [ EasyProcess pathpy pytest ]; + + # 0.2.1 has incompatible pycache files included + # https://github.com/ponty/entrypoint2/issues/8 + checkPhase = '' + rm -rf tests/__pycache__ + pytest tests + ''; + + meta = with lib; { + description = "Easy to use command-line interface for python modules"; + homepage = "https://github.com/ponty/entrypoint2/"; + license = licenses.bsd2; + maintainers = with maintainers; [ austinbutler ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index df3b769bf2f9..8bf36ea1ad23 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1869,6 +1869,8 @@ in { entrance-with-router-features = callPackage ../development/python-modules/entrance { routerFeatures = true; }; + entrypoint2 = callPackage ../development/python-modules/entrypoint2 { }; + entrypoints = callPackage ../development/python-modules/entrypoints { }; enum34 = callPackage ../development/python-modules/enum34 { };