1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8 build,
9 coloredlogs,
10 packaging,
11 pip,
12 readme-renderer,
13 toml,
14 twine,
15}:
16
17buildPythonPackage rec {
18 pname = "bork";
19 version = "8.0.0";
20 pyproject = true;
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "duckinator";
25 repo = pname;
26 rev = "refs/tags/v${version}";
27 hash = "sha256-BDwVhKmZ/F8CvpT6dEI5moQZx8wHy1TwdOl889XogEo=";
28 };
29
30 build-system = [
31 setuptools
32 ];
33
34 pythonRelaxDeps = [
35 "build"
36 "packaging"
37 "readme-renderer"
38 "twine"
39 "wheel"
40 ];
41
42 dependencies = [
43 build
44 coloredlogs
45 packaging
46 pip
47 readme-renderer
48 twine
49 ] ++ lib.optionals (pythonOlder "3.11") [ toml ];
50
51 pythonImportsCheck = [
52 "bork"
53 "bork.api"
54 "bork.cli"
55 ];
56
57 nativeCheckInputs = [ pytestCheckHook ];
58
59 pytestFlagsArray = [ "-m 'not network'" ];
60
61 disabledTests = [
62 # tries to call python -m bork
63 "test_repo"
64 ];
65
66 meta = with lib; {
67 description = "Python build and release management tool";
68 mainProgram = "bork";
69 homepage = "https://github.com/duckinator/bork";
70 maintainers = with maintainers; [ nicoo ];
71 platforms = platforms.all;
72 };
73}