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 ]; }; } diff --git a/pkgs/development/python-modules/pylddwrap/default.nix b/pkgs/development/python-modules/pylddwrap/default.nix new file mode 100644 index 000000000000..27bac5c1e3a0 --- /dev/null +++ b/pkgs/development/python-modules/pylddwrap/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, coreutils +, fetchFromGitHub +, icontract +, pytestCheckHook +, pythonOlder +, typing-extensions +}: + +buildPythonPackage rec { + pname = "pylddwrap"; + version = "1.2.2"; + format = "setuptools"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "Parquery"; + repo = pname; + rev = "v${version}"; + hash = "sha256-Gm82VRu8GP52BohQzpMUJfh6q2tiUA2GJWOcG7ymGgg="; + }; + + postPatch = '' + substituteInPlace lddwrap/__init__.py \ + --replace '/usr/bin/env' '${coreutils}/bin/env' + ''; + + # Upstream adds some plain text files direct to the package's root directory + # https://github.com/Parquery/pylddwrap/blob/master/setup.py#L71 + postInstall = '' + rm -f $out/{LICENSE,README.rst,requirements.txt} + ''; + + propagatedBuildInputs = [ + icontract + typing-extensions + ]; + + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "lddwrap" ]; + + meta = with lib; { + description = "Python wrapper around ldd *nix utility to determine shared libraries of a program"; + homepage = "https://github.com/Parquery/pylddwrap"; + changelog = "https://github.com/Parquery/pylddwrap/blob/v${version}/CHANGELOG.rst"; + license = licenses.mit; + maintainers = with maintainers; [ thiagokokada ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 06db4bb3052e..0dff68899a12 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6971,6 +6971,8 @@ self: super: with self; { pykrakenapi = callPackage ../development/python-modules/pykrakenapi { }; + pylddwrap = callPackage ../development/python-modules/pylddwrap { }; + pynndescent = callPackage ../development/python-modules/pynndescent { }; pynobo = callPackage ../development/python-modules/pynobo { };