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

View file

@ -1,7 +1,6 @@
{ stdenv
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, fetchFromGitHub
, pyparsing
, pytest
}:
@ -10,21 +9,27 @@ buildPythonPackage rec {
pname = "svgwrite";
version = "1.3.1";
src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "11e47749b159ed7004721e11d380b4642a26154b8cb2f7b0102fea9c71a3dfa1";
src = fetchFromGitHub {
owner = "mozman";
repo = "svgwrite";
rev = "v${version}";
sha256 = "14wz0y118a5wwfzin6cirr9254p4y825lnrnackihdbpw22gcw11";
};
buildInputs = [ setuptools ];
propagatedBuildInputs = [ pyparsing ];
checkInputs = [ pytest ];
propagatedBuildInputs = [
pyparsing
];
checkPhase = ''
checkInputs = [
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";
homepage = https://github.com/mozman/svgwrite;
license = licenses.mit;