Merge pull request #267758 from atalii/e3-core

e3-core: init at 22.3.1

authored by Peder Bergebakken Sundt and committed by GitHub 21dc638b 1fb12391

+109
+42
pkgs/development/python-modules/e3-core/0001-use-distro-over-ld.patch
··· 1 + From 189681bbfb703a7026ca7bbb3b21ef554807b144 Mon Sep 17 00:00:00 2001 2 + From: tali auster <taliauster@gmail.com> 3 + Date: Wed, 15 Nov 2023 12:15:34 -0700 4 + Subject: [PATCH] use distro over ld 5 + 6 + The `ld` module (linux distribution) was renamed to `distro`, presumably 7 + so as not to subsume binutils name. 8 + 9 + --- 10 + setup.py | 2 +- 11 + src/e3/os/platform.py | 2 +- 12 + 2 files changed, 2 insertions(+), 2 deletions(-) 13 + 14 + diff --git a/setup.py b/setup.py 15 + index c32f46f..de1ada6 100644 16 + --- a/setup.py 17 + +++ b/setup.py 18 + @@ -25,7 +25,7 @@ for p in ("darwin", "linux", "linux2", "win32"): 19 + platform_string = ":sys_platform=='%s'" % p 20 + extras_require[platform_string] = ["psutil"] 21 + if p in ("linux", "linux2"): 22 + - extras_require[platform_string].append("ld") 23 + + extras_require[platform_string].append("distro") 24 + 25 + # Get e3 version from the VERSION file. 26 + version_file = os.path.join(os.path.dirname(__file__), "VERSION") 27 + diff --git a/src/e3/os/platform.py b/src/e3/os/platform.py 28 + index 2d4e174..a9d12d3 100644 29 + --- a/src/e3/os/platform.py 30 + +++ b/src/e3/os/platform.py 31 + @@ -78,7 +78,7 @@ class SystemInfo: 32 + 33 + # Fetch linux distribution info on linux OS 34 + if cls.uname.system == "Linux": # linux-only 35 + - import ld 36 + + import distro as ld 37 + 38 + cls.ld_info = { 39 + "name": ld.name(), 40 + -- 41 + 2.40.1 42 +
+65
pkgs/development/python-modules/e3-core/default.nix
··· 1 + { buildPythonPackage 2 + , colorama 3 + , coverage 4 + , distro 5 + , fetchFromGitHub 6 + , httpretty 7 + , lib 8 + , mock 9 + , psutil 10 + , pytest 11 + , pytest-socket 12 + , python-dateutil 13 + , pyyaml 14 + , requests 15 + , requests-toolbelt 16 + , stdenv 17 + , setuptools 18 + , stevedore 19 + , tomlkit 20 + , tox 21 + , tqdm 22 + , typeguard 23 + }: 24 + 25 + buildPythonPackage rec { 26 + pname = "e3-core"; 27 + version = "22.3.1"; 28 + pyproject = true; 29 + 30 + src = fetchFromGitHub { 31 + owner = "AdaCore"; 32 + repo = "e3-core"; 33 + rev = "v${version}"; 34 + hash = "sha256-4StHOJldfeqApdF6D14Euzg9HvZ2e7G4/OQ0UrEbEIw="; 35 + }; 36 + 37 + patches = [ ./0001-use-distro-over-ld.patch ]; 38 + 39 + nativeBuildInputs = [ setuptools ]; 40 + 41 + propagatedBuildInputs = [ 42 + colorama pyyaml python-dateutil requests requests-toolbelt tqdm stevedore 43 + ] ++ lib.optional stdenv.isLinux [ 44 + # See setup.py:24. These are required only on Linux. Darwin has its own set 45 + # of requirements. 46 + psutil distro 47 + ]; 48 + 49 + pythonImportsCheck = [ "e3" ]; 50 + 51 + # e3-core is tested with tox; it's hard to test without internet. 52 + doCheck = false; 53 + 54 + meta = with lib; { 55 + changelog = "https://github.com/AdaCore/e3-core/releases/tag/${src.rev}"; 56 + homepage = "https://github.com/AdaCore/e3-core/"; 57 + description = "Core framework for developing portable automated build systems"; 58 + license = licenses.gpl3Only; 59 + maintainers = with maintainers; [ atalii ]; 60 + mainProgram = "e3"; 61 + # See the comment regarding distro and psutil. Other platforms are supported 62 + # upstream, but not by this package. 63 + platforms = platforms.linux; 64 + }; 65 + }
+2
pkgs/top-level/python-packages.nix
··· 3418 3418 3419 3419 dynd = callPackage ../development/python-modules/dynd { }; 3420 3420 3421 + e3-core = callPackage ../development/python-modules/e3-core { }; 3422 + 3421 3423 eagle100 = callPackage ../development/python-modules/eagle100 { }; 3422 3424 3423 3425 easydict = callPackage ../development/python-modules/easydict { };