depot/third_party/nixpkgs/pkgs/development/python-modules/psygnal/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

66 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, importlib-metadata
, numpy
, pydantic
, pytest-mypy-plugins
, pytestCheckHook
, pythonOlder
, setuptools-scm
, typing-extensions
, wheel
, wrapt
}:
buildPythonPackage rec {
pname = "psygnal";
version = "0.6.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "tlambert03";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-KCdX+pMUAQxeQRZhkrdGCKGjBaB1Ode/r1W8LJQPxyM=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
buildInputs = [
setuptools-scm
wheel
];
propagatedBuildInputs = [
typing-extensions
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
checkInputs = [
numpy
pydantic
pytest-mypy-plugins
pytestCheckHook
wrapt
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=psygnal --cov-report=term-missing" ""
'';
pythonImportsCheck = [
"psygnal"
];
meta = with lib; {
description = "Implementation of Qt Signals";
homepage = "https://github.com/tlambert03/psygnal";
license = licenses.bsd3;
maintainers = with maintainers; [ SomeoneSerge ];
};
}