Merge pull request #301788 from r-ryantm/auto-update/python311Packages.pylibftdi

python311Packages.pylibftdi: 0.21.0 -> 0.22.0
This commit is contained in:
Fabian Affolter 2024-04-06 12:58:48 +02:00 committed by GitHub
commit de56051fb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 16 deletions

View File

@ -1,42 +1,44 @@
{ lib
, buildPythonPackage
, fetchPypi
, libftdi1
, libusb1
, pythonOlder
{
lib,
buildPythonPackage,
fetchPypi,
libftdi1,
libusb1,
pythonOlder,
poetry-core,
}:
buildPythonPackage rec {
pname = "pylibftdi";
version = "0.21.0";
format = "setuptools";
version = "0.22.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-634vUFKFJUf0xsRgIqFmX510U0OWORcereVv3ICliDI=";
hash = "sha256-haaqtDj3ZTQoQ6otWbso+7DTCEemIfuYAJhRhZkPAa8=";
};
propagatedBuildInputs = [
build-system = [ poetry-core ];
dependencies = [
libftdi1
libusb1
];
postPatch = ''
substituteInPlace src/pylibftdi/driver.py \
--replace "self._load_library('libusb')" "cdll.LoadLibrary('${libusb1.out}/lib/libusb-1.0.so')" \
--replace "self._load_library('libftdi')" "cdll.LoadLibrary('${libftdi1.out}/lib/libftdi1.so')"
--replace-fail 'self._load_library("libusb")' 'cdll.LoadLibrary("${libusb1.out}/lib/libusb-1.0.so")' \
--replace-fail 'self._load_library("libftdi")' 'cdll.LoadLibrary("${libftdi1.out}/lib/libftdi1.so")'
'';
pythonImportsCheck = [
"pylibftdi"
];
pythonImportsCheck = [ "pylibftdi" ];
meta = with lib; {
description = "Wrapper to Intra2net's libftdi driver for FTDI's USB devices";
homepage = "https://pylibftdi.readthedocs.io/";
changelog = "https://github.com/codedstructure/pylibftdi/blob/${version}0/CHANGES.txt";
changelog = "https://github.com/codedstructure/pylibftdi/blob/${version}/CHANGES.txt";
license = licenses.mit;
maintainers = with maintainers; [ matthuszagh ];
};