mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-03 02:33:15 +00:00
python312Packages.deal: refactor
This commit is contained in:
parent
5a21935c78
commit
9f3532635a
@ -1,31 +1,31 @@
|
||||
{ lib
|
||||
, astroid
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, deal-solver
|
||||
, docstring-parser
|
||||
, fetchFromGitHub
|
||||
, flit-core
|
||||
, astroid
|
||||
, pytestCheckHook
|
||||
, docstring-parser
|
||||
, marshmallow
|
||||
, sphinx
|
||||
, hypothesis
|
||||
, vaa
|
||||
, deal-solver
|
||||
, marshmallow
|
||||
, pygments
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, sphinx
|
||||
, typeguard
|
||||
, urllib3
|
||||
, flake8
|
||||
, vaa
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "deal";
|
||||
version = "4.24.3";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "life4";
|
||||
repo = pname;
|
||||
repo = "deal";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-QlM3d/jmg6v3L3D45+cgcCej71U1dl4uZ6sAYGGm3tU=";
|
||||
};
|
||||
@ -33,17 +33,17 @@ buildPythonPackage rec {
|
||||
postPatch = ''
|
||||
# don't do coverage
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "\"--cov-fail-under=100\"," "" \
|
||||
--replace "\"--cov=deal\"," "" \
|
||||
--replace "\"--cov-report=html\"," "" \
|
||||
--replace "\"--cov-report=term-missing:skip-covered\"," ""
|
||||
--replace-fail '"--cov-fail-under=100",' "" \
|
||||
--replace-fail '"--cov=deal",' "" \
|
||||
--replace-fail '"--cov-report=html",' "" \
|
||||
--replace-fail '"--cov-report=term-missing:skip-covered",' ""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
flit-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
astroid
|
||||
deal-solver
|
||||
pygments
|
||||
@ -51,15 +51,13 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
|
||||
docstring-parser
|
||||
marshmallow
|
||||
sphinx
|
||||
hypothesis
|
||||
vaa
|
||||
marshmallow
|
||||
pytestCheckHook
|
||||
sphinx
|
||||
urllib3
|
||||
flake8
|
||||
vaa
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
@ -67,7 +65,7 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# needs internet access
|
||||
# Tests need internet access
|
||||
"test_smoke_has"
|
||||
"test_pure_offline"
|
||||
"test_raises_doesnt_override_another_contract"
|
||||
@ -84,25 +82,30 @@ buildPythonPackage rec {
|
||||
# assert errors
|
||||
"test_doctest"
|
||||
"test_no_violations"
|
||||
"test_source_get_lambda_multiline_splitted_dec"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# needs internet access
|
||||
# Test needs internet access
|
||||
"tests/test_runtime/test_offline.py"
|
||||
# depends on typeguard <4.0.0 for tests, but >=4.0.0 seems fine for runtime
|
||||
# https://github.com/life4/deal/blob/9be70fa1c5a0635880619b2cea83a9f6631eb236/pyproject.toml#L40
|
||||
"tests/test_testing.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "deal" ];
|
||||
pythonImportsCheck = [
|
||||
"deal"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library for design by contract (DbC) and checking values, exceptions, and side-effects";
|
||||
longDescription = ''
|
||||
In a nutshell, deal empowers you to write bug-free code.
|
||||
By adding a few decorators to your code, you get for free tests, static analysis, formal verification, and much more
|
||||
By adding a few decorators to your code, you get for free tests, static analysis, formal verification,
|
||||
and much more.
|
||||
'';
|
||||
homepage = "https://github.com/life4/deal";
|
||||
changelog = "https://github.com/life4/deal/releases/tag/${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ gador ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user