pythonPackages.svgwrite: refactor fix broken build

There was a single test in the build that tries to download a google
font.

(cherry picked from commit 6e02629a35)
This commit is contained in:
Chris Ostrouchov 2020-01-01 13:11:03 -05:00 committed by Jonathan Ringer
parent e0470e11c7
commit 7c85d7db72
No known key found for this signature in database
GPG Key ID: 5C841D3CFDFEC4E0
1 changed files with 17 additions and 12 deletions

View File

@ -1,7 +1,6 @@
{ stdenv { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchFromGitHub
, setuptools
, pyparsing , pyparsing
, pytest , pytest
}: }:
@ -10,21 +9,27 @@ buildPythonPackage rec {
pname = "svgwrite"; pname = "svgwrite";
version = "1.3.1"; version = "1.3.1";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "mozman";
extension = "zip"; repo = "svgwrite";
sha256 = "11e47749b159ed7004721e11d380b4642a26154b8cb2f7b0102fea9c71a3dfa1"; rev = "v${version}";
sha256 = "14wz0y118a5wwfzin6cirr9254p4y825lnrnackihdbpw22gcw11";
}; };
buildInputs = [ setuptools ]; propagatedBuildInputs = [
propagatedBuildInputs = [ pyparsing ]; pyparsing
checkInputs = [ pytest ]; ];
checkPhase = '' checkInputs = [
pytest pytest
];
# embed_google_web_font test tried to pull font from internet
checkPhase = ''
pytest -k "not test_embed_google_web_font"
''; '';
meta = with stdenv.lib; { meta = with lib; {
description = "A Python library to create SVG drawings"; description = "A Python library to create SVG drawings";
homepage = https://github.com/mozman/svgwrite; homepage = https://github.com/mozman/svgwrite;
license = licenses.mit; license = licenses.mit;