1{ lib, buildPythonPackage, fetchPypi, EasyProcess, pathpy, pytest }:
2
3buildPythonPackage rec {
4 pname = "entrypoint2";
5 version = "0.2.4";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "4770c3afcf3865c606a6e5f7cfcc5c59212f555fcee9b2540270399149c1dde3";
10 };
11
12 propagatedBuildInputs = [ ];
13
14 pythonImportsCheck = [ "entrypoint2" ];
15
16 # argparse is part of the standardlib
17 prePatch = ''
18 substituteInPlace setup.py --replace "argparse" ""
19 '';
20
21 checkInputs = [ EasyProcess pathpy pytest ];
22
23 # 0.2.1 has incompatible pycache files included
24 # https://github.com/ponty/entrypoint2/issues/8
25 checkPhase = ''
26 rm -rf tests/__pycache__
27 pytest tests
28 '';
29
30 meta = with lib; {
31 description = "Easy to use command-line interface for python modules";
32 homepage = "https://github.com/ponty/entrypoint2/";
33 license = licenses.bsd2;
34 maintainers = with maintainers; [ austinbutler ];
35 };
36}