Commit 91514e00 authored by Leandro Reina's avatar Leandro Reina
Browse files

python312Packages.libpcap: 1.11.0b7 -> 1.11.0b8

Also fixed the check phase
parent 2bc3edec
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -7,11 +7,12 @@
, pkgsLibpcap
, pkg-about
, setuptools
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "libpcap";
  version = "1.11.0b7";
  version = "1.11.0b8";
  format = "pyproject";

  disabled = pythonOlder "3.7";
@@ -19,7 +20,7 @@ buildPythonPackage rec {
  src = fetchPypi {
    inherit pname version;
    extension = "zip";
    hash = "sha256-gEWFqmeOJTVHdjcSOxfVLZtrNSO3CTY1L2VcXOu7q7k=";
    hash = "sha256-6XhEVOO2Z2rFZiMz4d32tTR+xUu1KdMdDjChmt2wsQo=";
  };

  nativeBuildInputs = [
@@ -29,7 +30,7 @@ buildPythonPackage rec {
  # tox is listed in build requirements but not actually used to build
  # keeping it as a requirement breaks the build unnecessarily
  postPatch = ''
    sed  -i "/requires/s/, 'tox>=3.25.1'//"  pyproject.toml
    sed -i "/requires/s/, 'tox>=[^']*'//" pyproject.toml
    cat <<EOF >src/libpcap/libpcap.cfg
    [libpcap]
    LIBPCAP = ${pkgsLibpcap}/lib/libpcap${stdenv.hostPlatform.extensions.sharedLibrary}
@@ -42,8 +43,15 @@ buildPythonPackage rec {
    pkg-about
  ];

  # Project has tests, but I can't get them to run even outside of nix
  doCheck = false;
  preCheck = ''
    pushd tests
  '';
  postCheck = ''
    popd
  '';
  nativeCheckInputs = [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "libpcap"
@@ -61,6 +69,7 @@ buildPythonPackage rec {
      It is fully compliant implementation of the original C libpcap from 1.0.0 up to 1.9.0 API and the WinPcap’s 4.1.3 libpcap (1.0.0rel0b) API by implementing whole its functionality in a clean Python instead of C.
    '';
    homepage = "https://github.com/karpierz/libpcap/";
    changelog = "https://github.com/karpierz/libpcap/blob/${version}/CHANGES.rst";
    license = licenses.bsd3;
    maintainers = teams.ororatech.members;
  };