depot/third_party/nixpkgs/pkgs/development/python-modules/entrypoint2/default.nix
Default email 1693fb2285 Project import generated by Copybara.
GitOrigin-RevId: 420f89ceb267b461eed5d025b6c3c0e57703cc5c
2020-10-07 11:15:18 +02:00

36 lines
918 B
Nix

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