2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydiscourse";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.7.0";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pydiscourse";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-KqJ6ag4owG7US5Q4Ygjq263ds1o/JhEJ3bNa8YecYtE=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pydiscourse"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Python library for working with Discourse";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pydiscoursecli";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/pydiscourse/pydiscourse";
|
|
|
|
changelog = "https://github.com/pydiscourse/pydiscourse/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ Dettorer ];
|
|
|
|
};
|
|
|
|
}
|