3
0
Fork 0
forked from mirrors/nixpkgs

python310Packages.psygnal: enable tests

- add pythonImportsCheck
- clean-up inputs
- disable on older Python releases
This commit is contained in:
Fabian Affolter 2022-10-17 09:47:39 +02:00 committed by GitHub
parent 4a53238964
commit c47002498d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,33 +1,64 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, wheel
, setuptools
, setuptools-scm
, pytestCheckHook
, importlib-metadata
, numpy
, pydantic
, pytest-mypy-plugins
, pytest-cov
, pytest
, mypy
, pytestCheckHook
, pythonOlder
, setuptools-scm
, typing-extensions
}: buildPythonPackage rec
{
, wheel
, wrapt
}:
buildPythonPackage rec {
pname = "psygnal";
version = "0.5.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "tlambert03";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-Hh1HG4VVcNXo62M/4mU3ZcSQNHmalcIDprkwD6/WRf8=";
hash = "sha256-Hh1HG4VVcNXo62M/4mU3ZcSQNHmalcIDprkwD6/WRf8=";
};
buildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ typing-extensions ];
checkInputs = [ pytestCheckHook pytest-cov pytest-mypy-plugins ];
doCheck = false; # mypy checks are failing
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 = "Pure python implementation of Qt Signals";
description = "Implementation of Qt Signals";
homepage = "https://github.com/tlambert03/psygnal";
license = licenses.bsd3;
maintainers = with maintainers; [ SomeoneSerge ];