2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, pythonOlder
|
2021-05-20 23:08:51 +00:00
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-10-19 23:25:03 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyaftership";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "21.11.0";
|
|
|
|
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;
|
|
|
|
rev = version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-SN7fvI/+VHYn2eYQe5wp6lEZ73YeZbsiPjDiq/Ibk3Q=";
|
2020-10-19 23:25:03 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
];
|
2020-10-19 23:25:03 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
checkInputs = [
|
|
|
|
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}",'
|
|
|
|
'';
|
|
|
|
|
|
|
|
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";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
};
|
|
|
|
}
|