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