Merge pull request #261581 from natsukium/python311Packages-openant-update

python311Packages.openant: 2017-02-11 -> 1.2.1
This commit is contained in:
Weijia Wang 2023-10-17 23:00:45 +02:00 committed by GitHub
commit ae7ea401ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,38 +1,60 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, pythonOlder
, setuptools
, pyusb , pyusb
, influxdb-client
, pyserial
, pytestCheckHook
}: }:
buildPythonPackage { buildPythonPackage rec {
pname = "openant-unstable"; pname = "openant-unstable";
version = "2017-02-11"; version = "1.2.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Tigge"; owner = "Tigge";
repo = "openant"; repo = "openant";
rev = "ed89281e37f65d768641e87356cef38877952397"; rev = "refs/tags/v${version}";
sha256 = "1g81l9arqdy09ijswn3sp4d6i3z18d44lzyb78bwnvdb14q22k19"; hash = "sha256-Ook9dwcyWvpaGylVDjBxQ2bnXRUBPYQHo6Wub+ISpwE=";
}; };
# Removes some setup.py hacks intended to install udev rules. nativeBuildInputs = [
# We do the job ourselves in postInstall below. setuptools
postPatch = '' ];
sed -i -e '/cmdclass=.*/d' setup.py
'';
postInstall = '' postInstall = ''
install -dm755 "$out/etc/udev/rules.d" install -dm755 "$out/etc/udev/rules.d"
install -m644 resources/ant-usb-sticks.rules "$out/etc/udev/rules.d/99-ant-usb-sticks.rules" install -m644 resources/42-ant-usb-sticks.rules "$out/etc/udev/rules.d/99-ant-usb-sticks.rules"
''; '';
propagatedBuildInputs = [ pyusb ]; propagatedBuildInputs = [ pyusb ];
passthru.optional-dependencies = {
serial = [
pyserial
];
influx = [
influxdb-client
];
};
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"openant"
];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/Tigge/openant"; homepage = "https://github.com/Tigge/openant";
description = "ANT and ANT-FS Python Library"; description = "ANT and ANT-FS Python Library";
license = licenses.mit; license = licenses.mit;
platforms = platforms.unix;
}; };
} }