@@ -0,0 +1,36 @@
1+{ lib, buildPythonPackage, fetchPypi, EasyProcess, pathpy, pytest }:
2+
3+buildPythonPackage rec {
4+ pname = "entrypoint2";
5+ version = "0.2.1";
6+
7+ src = fetchPypi {
8+ inherit pname version;
9+ sha256 = "15dya04884armqjdyqz1jgachkqgh9dc3p25lvyz9afvg73k2qav";
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+}