From b034c434f60da4f8e98a12c7eb551b68eb0f39e5 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 26 Oct 2020 00:49:30 +0100 Subject: [PATCH] pythonPackages.spotipy: disable tests and cleanup Tests require network access. --- .../python-modules/spotipy/default.nix | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/spotipy/default.nix b/pkgs/development/python-modules/spotipy/default.nix index fee4f093d08..63ec4abcac4 100644 --- a/pkgs/development/python-modules/spotipy/default.nix +++ b/pkgs/development/python-modules/spotipy/default.nix @@ -1,4 +1,8 @@ -{ stdenv, buildPythonPackage, fetchPypi, requests, six, mock }: +{ lib +, buildPythonPackage +, fetchPypi +, requests +, six }: buildPythonPackage rec { pname = "spotipy"; @@ -10,19 +14,19 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ requests six ]; - checkInputs = [ mock ]; - preConfigure = '' - substituteInPlace setup.py \ - --replace "mock==2.0.0" "mock" - ''; + # tests want to access the spotify API + doCheck = false; + pythonImportsCheck = [ + "spotipy" + "spotipy.oauth2" + ]; - pythonImportsCheck = [ "spotipy" ]; - - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://spotipy.readthedocs.org/"; + changelog = "https://github.com/plamere/spotipy/blob/${version}/CHANGELOG.md"; description = "A light weight Python library for the Spotify Web API"; license = licenses.mit; - maintainers = [ maintainers.rvolosatovs ]; + maintainers = with maintainers; [ rvolosatovs ]; }; }