Merge pull request #287759 from OroraTech/chore/update-libpcap

python312Packages.libpcap: 1.11.0b7 -> 1.11.0b8
This commit is contained in:
Peder Bergebakken Sundt 2024-04-26 22:16:33 +02:00 committed by GitHub
commit 566a19ed13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 5 deletions

View File

@ -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 WinPcaps 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;
};