python312Packages.python-snap7: convert to pep517 build

This commit is contained in:
Martin Weinelt 2024-10-25 00:06:51 +02:00
parent b075f35a31
commit 0d5e4264c3
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "python-snap7";
version = "1.4.1";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.6";
@ -21,14 +21,14 @@ buildPythonPackage rec {
hash = "sha256-CqLG5/U2k7WdZL5LfcFAnV1Q8HcIU7l36gi51lgB39s=";
};
propagatedBuildInputs = [ setuptools ];
prePatch = ''
substituteInPlace snap7/common.py \
--replace "lib_location = None" "lib_location = '${snap7}/lib/libsnap7.so'"
'';
# Tests require root privileges to open privilaged ports
build-system = [ setuptools ];
# Tests require root privileges to open privileged ports
doCheck = false;
pythonImportsCheck = [