mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 10:04:24 +01:00
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
60 lines
1.1 KiB
Nix
60 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
setuptools,
|
|
loguru,
|
|
pytest-asyncio,
|
|
pytestCheckHook,
|
|
typing-extensions,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "python-utils";
|
|
version = "3.9.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "WoLpH";
|
|
repo = "python-utils";
|
|
tag = "v${version}";
|
|
hash = "sha256-lzLzYI5jShfIwQqvfA8UtPjGawXE80ww7jb/gPzpeDo=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i pytest.ini \
|
|
-e '/--cov/d' \
|
|
-e '/--mypy/d'
|
|
'';
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ typing-extensions ];
|
|
|
|
optional-dependencies = {
|
|
loguru = [ loguru ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
]
|
|
++ optional-dependencies.loguru;
|
|
|
|
pythonImportsCheck = [ "python_utils" ];
|
|
|
|
enabledTestPaths = [ "_python_utils_tests" ];
|
|
|
|
disabledTests = [
|
|
# Flaky tests
|
|
"test_timeout_generator"
|
|
];
|
|
|
|
meta = {
|
|
description = "Module with some convenient utilities";
|
|
homepage = "https://github.com/WoLpH/python-utils";
|
|
changelog = "https://github.com/wolph/python-utils/releases/tag/v${version}";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = [ ];
|
|
};
|
|
}
|