python310Packages.cloudflare-dyndns: relax attrs constraint

- switch to poetry-core
This commit is contained in:
Fabian Affolter 2022-08-20 16:30:53 +02:00
parent 4e9fabfc66
commit 835642ea36

View file

@ -1,10 +1,11 @@
{ buildPythonApplication { lib
, buildPythonApplication
, attrs , attrs
, click , click
, cloudflare , cloudflare
, fetchFromGitHub , fetchFromGitHub
, lib , fetchpatch
, poetry , poetry-core
, pydantic , pydantic
, pytestCheckHook , pytestCheckHook
, requests , requests
@ -13,6 +14,7 @@
buildPythonApplication rec { buildPythonApplication rec {
pname = "cloudflare-dyndns"; pname = "cloudflare-dyndns";
version = "4.1"; version = "4.1";
format = "pyproject";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kissgyorgy"; owner = "kissgyorgy";
@ -21,9 +23,9 @@ buildPythonApplication rec {
hash = "sha256-6Q5fpJ+HuQ+hc3xTtB5tR43pn9WZ0nZZR723iLAkpis="; hash = "sha256-6Q5fpJ+HuQ+hc3xTtB5tR43pn9WZ0nZZR723iLAkpis=";
}; };
format = "pyproject"; nativeBuildInputs = [
poetry-core
nativeBuildInputs = [ poetry ]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
attrs attrs
@ -33,13 +35,25 @@ buildPythonApplication rec {
requests requests
]; ];
checkInputs = [
pytestCheckHook
];
patches = [
# Switch to poetry-core, https://github.com/kissgyorgy/cloudflare-dyndns/pull/22
(fetchpatch {
name = "switch-to-poetry-core.patch";
url = "https://github.com/kissgyorgy/cloudflare-dyndns/commit/741ed1ccb3373071ce15683a3b8ddc78d64866f8.patch";
sha256 = "sha256-mjSah0DWptZB6cjhP6dJg10BpJylPSQ2K4TKda7VmHw=";
})
];
postPatch = '' postPatch = ''
substituteInPlace pyproject.toml \ substituteInPlace pyproject.toml \
--replace 'click = "^7.0"' 'click = "*"' --replace 'click = "^7.0"' 'click = "*"' \
--replace 'attrs = "^21.1.0"' 'attrs = "*"'
''; '';
checkInputs = [ pytestCheckHook ];
disabledTests = [ disabledTests = [
"test_get_ipv4" "test_get_ipv4"
]; ];