Unverified Commit 730a40ca authored by Robert Schütz's avatar Robert Schütz Committed by GitHub
Browse files

Merge pull request #329424 from dotlambda/python3Packages.python-linux-procfs

python312Packages.python-linux-procfs: 0.6.3 -> 0.7.3
parents 20639319 b60dd6b4
Loading
Loading
Loading
Loading
+57 −0
Original line number Diff line number Diff line
@@ -2,32 +2,54 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch2,
  setuptools,
  pkg-config,
  libnl,
  nettools,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "python-ethtool";
  pname = "ethtool";
  version = "0.15";
  format = "setuptools";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "fedora-python";
    repo = pname;
    rev = "v${version}";
    sha256 = "0arkcfq64a4fl88vjjsx4gd3mhcpa7mpq6sblpkgs4k4m9mccz6i";
    repo = "python-ethtool";
    rev = "refs/tags/v${version}";
    hash = "sha256-0XzGaqpkEv3mpUsbfOtRl8E62iNdS7kRoo4oYrBjMys=";
  };

  patches = [
    # https://github.com/fedora-python/python-ethtool/pull/60
    (fetchpatch2 {
      url = "https://github.com/fedora-python/python-ethtool/commit/f82dd763bd50affda993b9afe3b141069a1a7466.patch";
      hash = "sha256-mtI7XsoyM43s2DFQdsBNpB8jJff7ZyO2J6SHodBrdrI=";
    })
  ];

  postPatch = ''
    substituteInPlace tests/parse_ifconfig.py --replace "Popen('ifconfig'," "Popen('${nettools}/bin/ifconfig',"
    substituteInPlace tests/parse_ifconfig.py \
      --replace-fail "Popen('ifconfig'," "Popen('${lib.getExe' nettools "ifconfig"}',"
  '';

  buildInputs = [ libnl ];
  build-system = [ setuptools ];

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ libnl ];

  pythonImportsCheck = [ "ethtool" ];

  nativeCheckInputs = [
    nettools
    pytestCheckHook
  ];

  meta = with lib; {
    changelog = "https://github.com/fedora-python/python-ethtool/blob/${src.rev}/CHANGES.rst";
    description = "Python bindings for the ethtool kernel interface";
    homepage = "https://github.com/fedora-python/python-ethtool";
    license = licenses.gpl2Plus;
+9 −6
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchzip,
  fetchurl,
  setuptools,
  six,
}:

buildPythonPackage rec {
  pname = "python-linux-procfs";
  version = "0.6.3";
  format = "setuptools";
  version = "0.7.3";
  pyproject = true;

  src = fetchzip {
  src = fetchurl {
    url = "https://git.kernel.org/pub/scm/libs/python/python-linux-procfs/python-linux-procfs.git/snapshot/python-linux-procfs-v${version}.tar.gz";
    hash = "sha256-iaKL7CWJbIvvcUCah7bKdwKZoZJehbQpZ7n0liO8N64=";
    hash = "sha256-6js8+PBqMwNYSe74zqZP8CZ5nt1ByjCWnex+wBY/LZU=";
  };

  propagatedBuildInputs = [ six ];
  build-system = [ setuptools ];

  dependencies = [ six ];

  # contains no tests
  doCheck = false;
+24 −19
Original line number Diff line number Diff line
{ lib
, buildPythonApplication
, fetchzip
, pygobject3
, glib
, gobject-introspection
, gtk3
, python-linux-procfs
, python-ethtool
, wrapGAppsHook3
{
  lib,
  python3,
  fetchurl,
  glib,
  gobject-introspection,
  gtk3,
  wrapGAppsHook3,
}:

buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
  pname = "tuna";
  version = "0.15";
  version = "0.19";
  pyproject = true;

  src = fetchzip {
  src = fetchurl {
    url = "https://git.kernel.org/pub/scm/utils/tuna/tuna.git/snapshot/tuna-v${version}.tar.gz";
    sha256 = "MwyLBwKz5ur1sBXHiCLq/Nq2u5aaiC+KzXqvGBmQii8=";
    hash = "sha256-t10CxtwnTOg1uQgm6mTrNUIU8LkXJ3BkTycjWteQvuU=";
  };

  postPatch = ''
    mv tuna-cmd.py tuna/cmd.py

    substituteInPlace setup.py \
      --replace 'packages = ["tuna", "tuna/gui"],' \
      --replace-fail 'packages = ["tuna", "tuna/gui"],' \
                     'packages = ["tuna", "tuna/gui"], entry_points={"console_scripts":["tuna=tuna.cmd:main"]},'

    substituteInPlace tuna/tuna_gui.py \
      --replace "self.binpath + 'pkexec'" "'/run/wrappers/bin/pkexec'" \
      --replace 'tuna_glade_dirs = [".", "tuna", "/usr/share/tuna"]' "tuna_glade_dirs = [ \"$out/share/tuna\" ]"
      --replace-fail "self.binpath + 'pkexec'" "'/run/wrappers/bin/pkexec'" \
      --replace-fail 'tuna_glade_dirs = [".", "tuna", "/usr/share/tuna"]' "tuna_glade_dirs = [ \"$out/share/tuna\" ]"
  '';

  build-system = with python3.pkgs; [ setuptools ];

  nativeBuildInputs = [
    glib.dev
    gobject-introspection
@@ -38,7 +39,11 @@ buildPythonApplication rec {
    wrapGAppsHook3
  ];

  propagatedBuildInputs = [ pygobject3 python-linux-procfs python-ethtool ];
  dependencies = with python3.pkgs; [
    pygobject3
    python-linux-procfs
    ethtool
  ];

  postInstall = ''
    mkdir -p $out/share/tuna
+1 −1
Original line number Diff line number Diff line
@@ -34470,7 +34470,7 @@ with pkgs;
  tudu = callPackage ../applications/office/tudu { };
  tuna = python3Packages.callPackage ../os-specific/linux/tuna { };
  tuna = callPackage ../os-specific/linux/tuna { };
  tunefish = callPackage ../applications/audio/tunefish {
    stdenv = clangStdenv; # https://github.com/jpcima/tunefish/issues/4
+1 −0
Original line number Diff line number Diff line
@@ -406,6 +406,7 @@ mapAliases ({
  PyMVGLive = pymvglive; # added 2023-02-19
  pymyq = python-myq; # added 2023-10-20
  pynose = throw "pynose was removed, because it violates the license of nose, by redistributing modified LGPL code under MIT.";
  python-ethtool = ethtool; # added 2024-07-23
  python-myq = throw "python-myq has been removed, as the service provider has decided to block its API requests"; # added 2023-12-07
  pyqt4 = throw "pyqt4 has been removed, because it depended on the long EOL qt4"; # added 2022-06-09
  pyqt5_sip = pyqt5-sip; # added 2024-01-07
Loading