1{
2 lib,
3 stdenv,
4 autoPatchelfHook,
5 buildPythonPackage,
6 colorama,
7 distro,
8 fetchFromGitHub,
9 packaging,
10 psutil,
11 python-dateutil,
12 pythonOlder,
13 pyyaml,
14 requests-cache,
15 requests-toolbelt,
16 requests,
17 resolvelib,
18 setuptools,
19 stevedore,
20 tqdm,
21}:
22
23buildPythonPackage rec {
24 pname = "e3-core";
25 version = "22.10.0";
26 pyproject = true;
27
28 disabled = pythonOlder "3.6";
29
30 src = fetchFromGitHub {
31 owner = "AdaCore";
32 repo = "e3-core";
33 tag = "v${version}";
34 hash = "sha256-LHWtgIvbS1PaF85aOpdhR0rWQGRUtbY0Qg1SZxQOsSc=";
35 };
36
37 build-system = [ setuptools ];
38
39 nativeBuildInputs = [ autoPatchelfHook ];
40
41 dependencies = [
42 colorama
43 packaging
44 python-dateutil
45 pyyaml
46 requests
47 requests-cache
48 requests-toolbelt
49 resolvelib
50 stevedore
51 tqdm
52 ]
53 ++ lib.optional stdenv.hostPlatform.isLinux [
54 # See https://github.com/AdaCore/e3-core/blob/v22.6.0/pyproject.toml#L37-L42
55 # These are required only on Linux. Darwin has its own set of requirements
56 psutil
57 distro
58 ];
59
60 pythonImportsCheck = [ "e3" ];
61
62 # e3-core is tested with tox; it's hard to test without internet.
63 doCheck = false;
64
65 meta = with lib; {
66 changelog = "https://github.com/AdaCore/e3-core/releases/tag/${src.tag}";
67 homepage = "https://github.com/AdaCore/e3-core/";
68 description = "Core framework for developing portable automated build systems";
69 license = licenses.gpl3Only;
70 maintainers = with maintainers; [ atalii ];
71 mainProgram = "e3";
72 # See the comment regarding distro and psutil. Other platforms are supported
73 # upstream, but not by this package.
74 platforms = platforms.linux;
75 };
76}