2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aresponses,
|
|
|
|
async-timeout,
|
|
|
|
backoff,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
sigstore,
|
2021-09-18 10:52:07 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiogithubapi";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "24.6.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ludeeus";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "aiogithubapi";
|
2022-12-17 10:02:37 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-z7l7Qx9Kg1FZ9nM0V2NzTyi3gbE2hakbc/GZ1CzDmKw=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Upstream is releasing with the help of a CI to PyPI, GitHub releases
|
|
|
|
# are not in their focus
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-07-27 06:49:29 +00:00
|
|
|
--replace-fail 'version = "0"' 'version = "${version}"'
|
2022-09-30 11:47:45 +00:00
|
|
|
'';
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ poetry-core ];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [
|
2021-09-18 10:52:07 +00:00
|
|
|
aiohttp
|
|
|
|
async-timeout
|
|
|
|
backoff
|
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
# Optional dependencies for deprecated-verify are not added
|
|
|
|
# Only sigstore < 2 is supported
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
2024-07-27 06:49:29 +00:00
|
|
|
sigstore
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "--asyncio-mode=auto" ];
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aiogithubapi" ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabledTests = [
|
|
|
|
# sigstore.errors.TUFError: Failed to refresh TUF metadata
|
|
|
|
"test_sigstore"
|
|
|
|
];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client for the GitHub API";
|
|
|
|
homepage = "https://github.com/ludeeus/aiogithubapi";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/ludeeus/aiogithubapi/releases/tag/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
license = licenses.mit;
|
2021-09-18 10:52:07 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|