diff --git a/pkgs/development/python-modules/nptyping/default.nix b/pkgs/development/python-modules/nptyping/default.nix new file mode 100644 index 000000000000..46e2a80102c9 --- /dev/null +++ b/pkgs/development/python-modules/nptyping/default.nix @@ -0,0 +1,56 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, beartype +, invoke +, mypy +, numpy +, pandas +, feedparser +, typeguard +}: + +buildPythonPackage rec { + pname = "nptyping"; + version = "2.4.1"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "ramonhagenaars"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-jV2MVMP/tlYN3djoViemGaJyzREoOJJamwG97WFhIvc="; + }; + + propagatedBuildInputs = [ numpy ]; + + checkInputs = [ + beartype feedparser invoke mypy pandas pytestCheckHook typeguard + ]; + + # tries to download data + disabledTests = [ "test_pandas_stubs_fork_is_synchronized" ]; + disabledTestPaths = [ + # missing pyright import: + "tests/test_pyright.py" + # can't find mypy stubs for pandas: + "tests/test_mypy.py" + "tests/pandas_/test_mypy_dataframe.py" + # tries to build wheel of package, broken/unnecessary under Nix: + "tests/test_wheel.py" + ]; + + pythonImportsCheck = [ + "nptyping" + ]; + + meta = with lib; { + description = "Type hints for numpy"; + homepage = "https://github.com/ramonhagenaars/nptyping"; + license = licenses.mit; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 584df45480e4..5aee4df7493d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6409,6 +6409,8 @@ self: super: with self; { nplusone = callPackage ../development/python-modules/nplusone { }; + nptyping = callPackage ../development/python-modules/nptyping { }; + npyscreen = callPackage ../development/python-modules/npyscreen { }; nsapi = callPackage ../development/python-modules/nsapi { };