Merge pull request #301784 from r-ryantm/auto-update/python311Packages.pyads

This commit is contained in:
Sandro 2024-04-06 12:06:09 +02:00 committed by GitHub
commit aa2a46548f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,45 +1,44 @@
{ lib {
, adslib lib,
, buildPythonPackage adslib,
, fetchFromGitHub buildPythonPackage,
, pytestCheckHook fetchFromGitHub,
, pythonOlder pytestCheckHook,
pythonOlder,
setuptools,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyads"; pname = "pyads";
version = "3.3.9"; version = "3.4.0";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "stlehmann"; owner = "stlehmann";
repo = pname; repo = "pyads";
rev = version; rev = "refs/tags/${version}";
hash = "sha256-eNouFJQDgp56fgkA7wZKfosKWOKU6OvXRjFwjCMvZqI="; hash = "sha256-HJ/dlRuwFSY5j/mAp6rLMlTV59GFwrTV27n73TWlCUo=";
}; };
buildInputs = [ build-system = [ setuptools ];
adslib
]; buildInputs = [ adslib ];
patchPhase = '' patchPhase = ''
substituteInPlace pyads/pyads_ex.py \ substituteInPlace pyads/pyads_ex.py \
--replace "ctypes.CDLL(adslib)" "ctypes.CDLL(\"${adslib}/lib/adslib.so\")" --replace-fail "ctypes.CDLL(adslib)" "ctypes.CDLL(\"${adslib}/lib/adslib.so\")"
''; '';
nativeCheckInputs = [ nativeCheckInputs = [ pytestCheckHook ];
pytestCheckHook
];
pythonImportsCheck = [ pythonImportsCheck = [ "pyads" ];
"pyads"
];
meta = with lib; { meta = with lib; {
description = "Python wrapper for TwinCAT ADS library"; description = "Python wrapper for TwinCAT ADS library";
homepage = "https://github.com/MrLeeh/pyads"; homepage = "https://github.com/MrLeeh/pyads";
changelog = "https://github.com/stlehmann/pyads/releases/tag/${version}";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ jamiemagee ]; maintainers = with maintainers; [ jamiemagee ];
}; };