depot/third_party/nixpkgs/pkgs/development/python-modules/aiogithubapi/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

66 lines
1.2 KiB
Nix

{ lib
, aiohttp
, aresponses
, async-timeout
, backoff
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "aiogithubapi";
version = "22.10.1";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "ludeeus";
repo = pname;
rev = version;
hash = "sha256-ceBuqaMqqL6qwN52765MG4sLt+08hx2G9rUVNC7x6ik=";
};
postPatch = ''
# Upstream is releasing with the help of a CI to PyPI, GitHub releases
# are not in their focus
substituteInPlace pyproject.toml \
--replace 'version = "0"' 'version = "${version}"' \
--replace 'backoff = "^1.10.0"' 'backoff = "*"'
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
async-timeout
backoff
];
checkInputs = [
aresponses
pytest-asyncio
pytestCheckHook
];
pytestFlagsArray = [
"--asyncio-mode=legacy"
];
pythonImportsCheck = [
"aiogithubapi"
];
meta = with lib; {
description = "Python client for the GitHub API";
homepage = "https://github.com/ludeeus/aiogithubapi";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}