3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/psygnal/default.nix
2022-10-30 05:39:11 +00:00

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