2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
importlib-metadata,
|
|
|
|
mypy-extensions,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
|
|
|
setuptools,
|
|
|
|
typing-extensions,
|
2022-12-02 08:20:57 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "logilab-common";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.0.0";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2022-12-02 08:20:57 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-ojvR2k3Wpj5Ej0OS57I4aFX/cGFVeL/PmT7riCTelws=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postPatch = lib.optionals (pythonAtLeast "3.12") ''
|
|
|
|
substituteInPlace logilab/common/testlib.py \
|
|
|
|
--replace-fail "_TextTestResult" "TextTestResult"
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
2022-12-02 08:20:57 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [
|
2023-10-09 19:29:22 +00:00
|
|
|
setuptools
|
2022-12-02 08:20:57 +00:00
|
|
|
mypy-extensions
|
|
|
|
typing-extensions
|
2024-05-15 15:35:15 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2022-12-02 08:20:57 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-12-02 08:20:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytz
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
preCheck = ''
|
|
|
|
export COLLECT_DEPRECATION_WARNINGS_PACKAGE_NAME=true
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-05-15 15:35:15 +00:00
|
|
|
description = "Python packages and modules used by Logilab";
|
2022-12-02 08:20:57 +00:00
|
|
|
homepage = "https://logilab-common.readthedocs.io/";
|
|
|
|
changelog = "https://forge.extranet.logilab.fr/open-source/logilab-common/-/blob/branch/default/CHANGELOG.md";
|
|
|
|
license = licenses.lgpl21Plus;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
mainProgram = "logilab-pytest";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|