about summary refs log tree commit diff
path: root/pkgs/development/python-modules/entrypoint2
diff options
context:
space:
mode:
authorAustin Butler <austinabutler@gmail.com>2020-09-26 18:51:03 -0700
committerJon <jonringer@users.noreply.github.com>2020-09-26 18:54:09 -0700
commit84d74ae9c9cbed73274b8e4e00be14688ffc93fe (patch)
tree74c733c8eabf97d6884539ef97d8616c3304d577 /pkgs/development/python-modules/entrypoint2
parentaf2dc4d401f87f96e752d14c0733681e30d30f43 (diff)
pythonPackages.entrypoint2: init at 0.2.1
Diffstat (limited to 'pkgs/development/python-modules/entrypoint2')
-rw-r--r--pkgs/development/python-modules/entrypoint2/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/entrypoint2/default.nix b/pkgs/development/python-modules/entrypoint2/default.nix
new file mode 100644
index 0000000000000..301de3e278f3e
--- /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 ];
+  };
+}