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 {
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 ];
};
}