python312Packages.pygreat: 2019.5.1.dev0 -> 2024.0.2 (#353406)

This commit is contained in:
Sandro 2024-11-11 14:09:28 +01:00 committed by GitHub
commit 48b24dbc2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,41 +1,59 @@
{
lib,
buildPythonPackage,
isPy3k,
fetchFromGitHub,
setuptools,
pythonOlder,
future,
pyusb,
}:
buildPythonPackage {
buildPythonPackage rec {
pname = "pygreat";
version = "2019.5.1.dev0";
format = "setuptools";
version = "2024.0.2";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "greatscottgadgets";
repo = "libgreat";
rev = "14c00b7c8f036f4d467e4b1a324ffa3566b126fa";
sha256 = "1h0z83k1k4z8j36z936h61l8j3cjr3wsxr86k91v5c5h93g9dkqh";
rev = "refs/tags/v${version}";
hash = "sha256-yYp+2y4QIOykkrObWaXbZMMc2fsRn/+tGWqySA7V534=";
};
propagatedBuildInputs = [
sourceRoot = "${src.name}/host";
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"setuptools-git-versioning<2"' "" \
--replace-fail 'dynamic = ["version"]' 'version = "${version}"'
'';
build-system = [
setuptools
];
pythonRemoveDeps = [
"backports.functools-lru-cache"
];
dependencies = [
future
pyusb
];
disabled = !isPy3k;
# has no tests
doCheck = false;
preBuild = ''
cd host
substituteInPlace setup.py --replace "'backports.functools_lru_cache'" ""
substituteInPlace pygreat/comms.py --replace "from backports.functools_lru_cache import lru_cache as memoize_with_lru_cache" "from functools import lru_cache as memoize_with_lru_cache"
echo "$version" > ../VERSION
'';
pythonImportsCheck = [
"pygreat"
];
meta = with lib; {
meta = {
changelog = "https://github.com/greatscottgadgets/libgreat/releases/tag/v${version}";
description = "Python library for talking with libGreat devices";
homepage = "https://greatscottgadgets.com/greatfet/";
license = with licenses; [ bsd3 ];
homepage = "https://github.com/greatscottgadgets/libgreat/";
license = with lib.licenses; [ bsd3 ];
maintainers = with lib.maintainers; [ carlossless ];
};
}