nixpkgs/pkgs/development/python-modules/bork/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.3 KiB
Nix
Raw Normal View History

2023-10-30 23:09:06 +00:00
{
lib,
buildPythonPackage,
callPackage,
2023-10-30 23:09:06 +00:00
fetchFromGitHub,
2023-11-17 11:20:21 +00:00
pytestCheckHook,
2023-10-30 23:09:06 +00:00
pythonOlder,
2024-08-01 15:34:53 +00:00
2024-03-17 21:55:43 +00:00
setuptools,
2023-10-30 23:09:06 +00:00
build,
coloredlogs,
2024-08-01 15:34:53 +00:00
importlib-metadata,
2023-10-30 23:09:06 +00:00
packaging,
2023-11-09 13:06:41 +00:00
pip,
2023-10-30 23:09:06 +00:00
toml,
2024-08-01 15:34:53 +00:00
urllib3,
2023-10-30 23:09:06 +00:00
}:
buildPythonPackage rec {
pname = "bork";
2024-08-01 15:34:53 +00:00
version = "9.0.0";
2023-10-30 23:09:06 +00:00
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "duckinator";
repo = pname;
2024-03-08 01:39:22 +00:00
rev = "refs/tags/v${version}";
2024-08-01 15:34:53 +00:00
hash = "sha256-YqvtOwd00TXD4I3fIQolvjHnjREvQgbdrEO9Z96v1Kk=";
2023-10-30 23:09:06 +00:00
};
2024-03-17 21:55:43 +00:00
build-system = [
setuptools
];
pythonRelaxDeps = [
"packaging"
];
2024-03-17 21:55:43 +00:00
dependencies = [
2023-10-30 23:09:06 +00:00
build
coloredlogs
packaging
2023-11-09 13:06:41 +00:00
pip
2024-08-01 15:34:53 +00:00
urllib3
] ++ lib.optionals (pythonOlder "3.11") [ toml ]
++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]
;
2023-10-30 23:09:06 +00:00
pythonImportsCheck = [
"bork"
"bork.api"
"bork.cli"
];
2023-11-17 11:20:21 +00:00
nativeCheckInputs = [ pytestCheckHook ];
2024-03-17 21:55:43 +00:00
2023-11-17 11:20:21 +00:00
pytestFlagsArray = [ "-m 'not network'" ];
2024-03-17 21:55:43 +00:00
disabledTests = [
# tries to call python -m bork
"test_repo"
];
passthru.tests = callPackage ./tests.nix { };
2023-10-30 23:09:06 +00:00
meta = with lib; {
description = "Python build and release management tool";
mainProgram = "bork";
2023-10-30 23:09:06 +00:00
homepage = "https://github.com/duckinator/bork";
license = licenses.mit;
2023-10-30 23:09:06 +00:00
maintainers = with maintainers; [ nicoo ];
};
}