From 1d8203ff1eb17b73f9b8d0c47082eabc63392e64 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 3 Nov 2022 12:53:22 +0000 Subject: [PATCH] python3.pkgs.icontract: remove plain text files from package --- .../python-modules/icontract/default.nix | 41 ++++++++----------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/pkgs/development/python-modules/icontract/default.nix b/pkgs/development/python-modules/icontract/default.nix index 41bd796372d1..192a6db039ad 100644 --- a/pkgs/development/python-modules/icontract/default.nix +++ b/pkgs/development/python-modules/icontract/default.nix @@ -2,20 +2,14 @@ , buildPythonPackage , pythonOlder , fetchFromGitHub -, asttokens -, typing-extensions -, pytestCheckHook -, yapf -, docutils -, pygments -, dpcontracts -, tabulate -, py-cpuinfo -, typeguard , astor -, numpy +, asttokens , asyncstdlib , deal +, dpcontracts +, numpy +, pytestCheckHook +, typing-extensions }: buildPythonPackage rec { @@ -38,40 +32,39 @@ buildPythonPackage rec { export ICONTRACT_SLOW=1 ''; - propagatedBuildInputs = [ asttokens typing-extensions ]; checkInputs = [ - pytestCheckHook - yapf - docutils - pygments - dpcontracts - tabulate - py-cpuinfo - typeguard astor - numpy asyncstdlib deal + dpcontracts + numpy + pytestCheckHook ]; disabledTestPaths = [ - # mypy decorator checks don't pass. For some reaseon mypy + # mypy decorator checks don't pass. For some reason mypy # doesn't check the python file provided in the test. "tests/test_mypy_decorators.py" ]; + # Upstream adds some plain text files direct to the package's root directory + # https://github.com/Parquery/icontract/blob/master/setup.py#L63 + postInstall = '' + rm -f $out/{LICENSE.txt,README.rst,requirements.txt} + ''; + pythonImportsCheck = [ "icontract" ]; meta = with lib; { description = "Provide design-by-contract with informative violation messages"; homepage = "https://github.com/Parquery/icontract"; - changelog = "https://github.com/Parquery/icontract/blob/master/CHANGELOG.rst"; + changelog = "https://github.com/Parquery/icontract/blob/v${version}/CHANGELOG.rst"; license = licenses.mit; - maintainers = with maintainers; [ gador ]; + maintainers = with maintainers; [ gador thiagokokada ]; }; }