python311Packages.dvc: disable on unsupported Python releases

This commit is contained in:
Fabian Affolter 2024-01-19 07:03:09 +01:00
parent f0af16131e
commit 1b699df059

View file

@ -36,6 +36,7 @@
, pydot , pydot
, pygtrie , pygtrie
, pyparsing , pyparsing
, pythonOlder
, requests , requests
, rich , rich
, ruamel-yaml , ruamel-yaml
@ -59,6 +60,8 @@ buildPythonPackage rec {
version = "3.40.1"; version = "3.40.1";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "iterative"; owner = "iterative";
repo = "dvc"; repo = "dvc";
@ -72,7 +75,8 @@ buildPythonPackage rec {
]; ];
postPatch = '' postPatch = ''
substituteInPlace dvc/analytics.py --replace 'enabled = not os.getenv(DVC_NO_ANALYTICS)' 'enabled = False' substituteInPlace dvc/analytics.py \
--replace 'enabled = not os.getenv(DVC_NO_ANALYTICS)' 'enabled = False'
substituteInPlace dvc/daemon.py \ substituteInPlace dvc/daemon.py \
--subst-var-by dvc "$out/bin/dcv" --subst-var-by dvc "$out/bin/dcv"
''; '';