1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
85 lines
1.8 KiB
Nix
85 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
astor,
|
|
asttokens,
|
|
asyncstdlib,
|
|
buildPythonPackage,
|
|
deal,
|
|
dpcontracts,
|
|
fetchFromGitHub,
|
|
numpy,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
typing-extensions,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "icontract";
|
|
version = "2.7.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Parquery";
|
|
repo = "icontract";
|
|
tag = "v${version}";
|
|
hash = "sha256-FRfDcjylYGWwYPgCipzS+NZYCSPATlQdWtavTo/NZY0=";
|
|
};
|
|
|
|
preCheck = ''
|
|
# we don't want to use the precommit.py script to build the package.
|
|
# For the tests to succeed, "ICONTRACT_SLOW" needs to be set.
|
|
# see https://github.com/Parquery/icontract/blob/aaeb1b06780a34b05743377e4cb2458780e808d3/precommit.py#L57
|
|
export ICONTRACT_SLOW=1
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
asttokens
|
|
typing-extensions
|
|
];
|
|
pythonRelaxDeps = [
|
|
"asttokens"
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
astor
|
|
asyncstdlib
|
|
deal
|
|
dpcontracts
|
|
numpy
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTests = [
|
|
# AssertionError
|
|
"test_abstract_method_not_implemented"
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
# mypy decorator checks don't pass. For some reason mypy
|
|
# doesn't check the python file provided in the test.
|
|
"tests/test_mypy_decorators.py"
|
|
# Those tests seems to simply re-run some typeguard tests
|
|
"tests/test_typeguard.py"
|
|
];
|
|
|
|
pytestFlags = [
|
|
# RuntimeWarning: coroutine '*' was never awaited
|
|
"-Wignore::RuntimeWarning"
|
|
];
|
|
|
|
pythonImportsCheck = [ "icontract" ];
|
|
|
|
meta = {
|
|
description = "Provide design-by-contract with informative violation messages";
|
|
homepage = "https://github.com/Parquery/icontract";
|
|
changelog = "https://github.com/Parquery/icontract/blob/v${version}/CHANGELOG.rst";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
gador
|
|
thiagokokada
|
|
];
|
|
};
|
|
}
|