2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
aiohttp,
|
|
|
|
aresponses,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-10-19 23:25:03 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyaftership";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "23.1.0";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
2020-10-19 23:25:03 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-10-19 23:25:03 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ludeeus";
|
|
|
|
repo = pname;
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-njlDScmxIYWxB4EL9lOSGCXqZDzP999gI9EkpcZyFlE=";
|
2020-10-19 23:25:03 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ aiohttp ];
|
2020-10-19 23:25:03 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Upstream is releasing with the help of a CI to PyPI, GitHub releases
|
|
|
|
# are not in their focus
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'version="main",' 'version="${version}",'
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pyaftership" ];
|
2020-10-19 23:25:03 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python wrapper package for the AfterShip API";
|
|
|
|
homepage = "https://github.com/ludeeus/pyaftership";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/ludeeus/pyaftership/releases/tag/${version}";
|
2020-10-19 23:25:03 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
};
|
|
|
|
}
|