From 364aa17311e9d003fe91f630f6d382bf4c7ed2dc Mon Sep 17 00:00:00 2001 From: 9R Date: Fri, 19 Apr 2024 10:51:05 +0200 Subject: [PATCH 1/3] python3Package.pyowm: add missing dependency setuptools --- pkgs/development/python-modules/pyowm/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/pyowm/default.nix b/pkgs/development/python-modules/pyowm/default.nix index d95cda12d600..41d661e98c02 100644 --- a/pkgs/development/python-modules/pyowm/default.nix +++ b/pkgs/development/python-modules/pyowm/default.nix @@ -5,6 +5,7 @@ , pysocks , pythonOlder , requests +, setuptools , pytestCheckHook , pythonRelaxDepsHook }: @@ -35,6 +36,7 @@ buildPythonPackage rec { geojson pysocks requests + setuptools ]; nativeCheckInputs = [ From 1feeea57f4c41867c5367925ad2977c9e9bdaa14 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Apr 2024 11:18:37 +0200 Subject: [PATCH 2/3] python312Package.pyowm: refactor --- pkgs/development/python-modules/pyowm/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pyowm/default.nix b/pkgs/development/python-modules/pyowm/default.nix index 41d661e98c02..dd3ce0aca9ff 100644 --- a/pkgs/development/python-modules/pyowm/default.nix +++ b/pkgs/development/python-modules/pyowm/default.nix @@ -13,14 +13,14 @@ buildPythonPackage rec { pname = "pyowm"; version = "3.3.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "csparpa"; - repo = pname; - rev = version; + repo = "pyowm"; + rev = "refs/tags/${version}"; hash = "sha256-cSOhm3aDksLBChZzgw1gjUjLQkElR2/xGFMOb9K9RME="; }; @@ -28,11 +28,15 @@ buildPythonPackage rec { "geojson" ]; + build-system = [ + setuptools + ]; + nativeBuildInputs = [ pythonRelaxDepsHook ]; - propagatedBuildInputs = [ + dependencies = [ geojson pysocks requests @@ -55,6 +59,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python wrapper around the OpenWeatherMap web API"; homepage = "https://pyowm.readthedocs.io/"; + changelog = "https://github.com/csparpa/pyowm/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ fab ]; }; From 52166c45cf0f17ddf7613e4d71bced66b3d6e050 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Apr 2024 11:18:57 +0200 Subject: [PATCH 3/3] python3Package.pyowm: foramt with nixfmt --- .../python-modules/pyowm/default.nix | 45 +++++++------------ 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/pkgs/development/python-modules/pyowm/default.nix b/pkgs/development/python-modules/pyowm/default.nix index dd3ce0aca9ff..d342ce313e8c 100644 --- a/pkgs/development/python-modules/pyowm/default.nix +++ b/pkgs/development/python-modules/pyowm/default.nix @@ -1,13 +1,14 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, geojson -, pysocks -, pythonOlder -, requests -, setuptools -, pytestCheckHook -, pythonRelaxDepsHook +{ + lib, + buildPythonPackage, + fetchFromGitHub, + geojson, + pysocks, + pythonOlder, + requests, + setuptools, + pytestCheckHook, + pythonRelaxDepsHook, }: buildPythonPackage rec { @@ -24,17 +25,11 @@ buildPythonPackage rec { hash = "sha256-cSOhm3aDksLBChZzgw1gjUjLQkElR2/xGFMOb9K9RME="; }; - pythonRelaxDeps = [ - "geojson" - ]; + pythonRelaxDeps = [ "geojson" ]; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; - nativeBuildInputs = [ - pythonRelaxDepsHook - ]; + nativeBuildInputs = [ pythonRelaxDepsHook ]; dependencies = [ geojson @@ -43,18 +38,12 @@ buildPythonPackage rec { setuptools ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; # Run only tests which don't require network access - pytestFlagsArray = [ - "tests/unit" - ]; + pytestFlagsArray = [ "tests/unit" ]; - pythonImportsCheck = [ - "pyowm" - ]; + pythonImportsCheck = [ "pyowm" ]; meta = with lib; { description = "Python wrapper around the OpenWeatherMap web API";