From 8ea77fe071c85e922ea9b3de9c59c4cc9eadd6aa Mon Sep 17 00:00:00 2001 From: Pyrox Date: Mon, 29 Jul 2024 01:58:44 -0400 Subject: [PATCH 1/2] python312Packages.locationsharinglib: drop nose dependency --- .../locationsharinglib/default.nix | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/locationsharinglib/default.nix b/pkgs/development/python-modules/locationsharinglib/default.nix index 76f818210e1a..be9adbf710da 100644 --- a/pkgs/development/python-modules/locationsharinglib/default.nix +++ b/pkgs/development/python-modules/locationsharinglib/default.nix @@ -1,12 +1,9 @@ { lib, - betamax, buildPythonPackage, cachetools, coloredlogs, - emoji, fetchPypi, - nose, pythonOlder, pytz, requests, @@ -30,13 +27,6 @@ buildPythonPackage rec { cachetools pytz ]; - - nativeCheckInputs = [ - betamax - emoji - nose - ]; - postPatch = '' # Tests requirements want to pull in multiple modules which we don't need substituteInPlace setup.py \ @@ -46,12 +36,8 @@ buildPythonPackage rec { --replace "pytz>=2023.3" "pytz" ''; - checkPhase = '' - runHook preCheck - # Only coverage no real unit tests - nosetests - runHook postCheck - ''; + # There are no tests + doCheck = false; pythonImportsCheck = [ "locationsharinglib" ]; From 3621f09038c2eb83760a785211770650d658bbc7 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Mon, 29 Jul 2024 02:01:38 -0400 Subject: [PATCH 2/2] python312Packages.locationsharinglib: modernize --- .../locationsharinglib/default.nix | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/locationsharinglib/default.nix b/pkgs/development/python-modules/locationsharinglib/default.nix index be9adbf710da..6b3791c29ac5 100644 --- a/pkgs/development/python-modules/locationsharinglib/default.nix +++ b/pkgs/development/python-modules/locationsharinglib/default.nix @@ -7,45 +7,47 @@ pythonOlder, pytz, requests, + setuptools, }: buildPythonPackage rec { pname = "locationsharinglib"; version = "5.0.3"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; hash = "sha256-ar5/gyDnby0aceqqHe8lTQaHafOub+IPKglmct4xEGM="; }; - propagatedBuildInputs = [ + postPatch = '' + # Tests requirements want to pull in multiple modules which we don't need + substituteInPlace setup.py \ + --replace-fail "tests_require=test_requirements" "tests_require=[]" + cp .VERSION locationsharinglib/.VERSION + ''; + + build-system = [ setuptools ]; + + dependencies = [ coloredlogs requests cachetools pytz ]; - postPatch = '' - # Tests requirements want to pull in multiple modules which we don't need - substituteInPlace setup.py \ - --replace "tests_require=test_requirements" "tests_require=[]" - substituteInPlace requirements.txt \ - --replace "coloredlogs>=15.0.1" "coloredlogs" \ - --replace "pytz>=2023.3" "pytz" - ''; # There are no tests doCheck = false; pythonImportsCheck = [ "locationsharinglib" ]; - meta = with lib; { + meta = { description = "Python package to retrieve coordinates from a Google account"; homepage = "https://locationsharinglib.readthedocs.io/"; changelog = "https://github.com/costastf/locationsharinglib/blob/${version}/HISTORY.rst"; - license = licenses.mit; - maintainers = with maintainers; [ fab ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; }; }