python310Packages.psygnal: enable tests
- add pythonImportsCheck - clean-up inputs - disable on older Python releases
This commit is contained in:
parent
4a53238964
commit
c47002498d
1 changed files with 46 additions and 15 deletions
|
@ -1,33 +1,64 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, wheel
|
, importlib-metadata
|
||||||
, setuptools
|
, numpy
|
||||||
, setuptools-scm
|
, pydantic
|
||||||
, pytestCheckHook
|
|
||||||
, pytest-mypy-plugins
|
, pytest-mypy-plugins
|
||||||
, pytest-cov
|
, pytestCheckHook
|
||||||
, pytest
|
, pythonOlder
|
||||||
, mypy
|
, setuptools-scm
|
||||||
, typing-extensions
|
, typing-extensions
|
||||||
}: buildPythonPackage rec
|
, wheel
|
||||||
{
|
, wrapt
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
pname = "psygnal";
|
pname = "psygnal";
|
||||||
version = "0.5.0";
|
version = "0.5.0";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tlambert03";
|
owner = "tlambert03";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "refs/tags/v${version}";
|
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;
|
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; {
|
meta = with lib; {
|
||||||
description = "Pure python implementation of Qt Signals";
|
description = "Implementation of Qt Signals";
|
||||||
homepage = "https://github.com/tlambert03/psygnal";
|
homepage = "https://github.com/tlambert03/psygnal";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = with maintainers; [ SomeoneSerge ];
|
maintainers = with maintainers; [ SomeoneSerge ];
|
||||||
|
|
Loading…
Reference in a new issue