Merge pull request #327202 from GaetanLepage/lightning-utilities

python311Packages.lightning-utilities: 0.11.3.post0 -> 0.11.4 + fix on python 3.12
This commit is contained in:
Gaétan Lepage
2024-07-15 13:58:02 +02:00
committed by GitHub
@@ -1,13 +1,14 @@
{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
pythonAtLeast,
# build
setuptools,
# runtime
looseversion,
packaging,
typing-extensions,
@@ -18,19 +19,27 @@
buildPythonPackage rec {
pname = "lightning-utilities";
version = "0.11.3.post0";
version = "0.11.5";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "Lightning-AI";
repo = "utilities";
rev = "refs/tags/v${version}";
hash = "sha256-pOy8BCNwuPcM6cvUl295y+0QrcWOq2rT9iZMKyBxpqg=";
hash = "sha256-Ia+NF9WHU1rJHV/j3tRiqudK3TJNEolNKShFfUehxHU=";
};
postPatch = ''
substituteInPlace src/lightning_utilities/install/requirements.py \
--replace-fail "from distutils.version import LooseVersion" "from looseversion import LooseVersion"
'';
build-system = [ setuptools ];
dependencies = [
looseversion
packaging
typing-extensions
];
@@ -61,18 +70,11 @@ buildPythonPackage rec {
"src/lightning_utilities/install/requirements.py"
];
pytestFlagsArray = [
# warns about distutils removal in python 3.12
"-W"
"ignore::DeprecationWarning"
];
meta = {
changelog = "https://github.com/Lightning-AI/utilities/releases/tag/v${version}";
description = "Common Python utilities and GitHub Actions in Lightning Ecosystem";
homepage = "https://github.com/Lightning-AI/utilities";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ GaetanLepage ];
broken = pythonAtLeast "3.12";
};
}