pythonPackages.spotipy: disable tests and cleanup

Tests require network access.
This commit is contained in:
Martin Weinelt 2020-10-26 00:49:30 +01:00 committed by Jonathan Ringer
parent c6174c208a
commit b034c434f6

View File

@ -1,4 +1,8 @@
{ stdenv, buildPythonPackage, fetchPypi, requests, six, mock }: { lib
, buildPythonPackage
, fetchPypi
, requests
, six }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "spotipy"; pname = "spotipy";
@ -10,19 +14,19 @@ buildPythonPackage rec {
}; };
propagatedBuildInputs = [ requests six ]; propagatedBuildInputs = [ requests six ];
checkInputs = [ mock ];
preConfigure = '' # tests want to access the spotify API
substituteInPlace setup.py \ doCheck = false;
--replace "mock==2.0.0" "mock" pythonImportsCheck = [
''; "spotipy"
"spotipy.oauth2"
];
pythonImportsCheck = [ "spotipy" ]; meta = with lib; {
meta = with stdenv.lib; {
homepage = "https://spotipy.readthedocs.org/"; 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"; description = "A light weight Python library for the Spotify Web API";
license = licenses.mit; license = licenses.mit;
maintainers = [ maintainers.rvolosatovs ]; maintainers = with maintainers; [ rvolosatovs ];
}; };
} }