python39Packages.weasyprint: remove extra pytest, remove linting only tests, format to standard pythonPackages layout, clarify test comment which is also true for linux

main
Sandro Jäckel 3 years ago
parent 412899feae
commit 8bc4944f27
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
  1. 81
      pkgs/development/python-modules/weasyprint/default.nix

@ -1,31 +1,27 @@
{ buildPythonPackage,
fetchPypi,
fetchpatch,
pytestCheckHook,
brotli,
cairosvg,
fonttools,
pydyf,
pyphen,
cffi,
cssselect,
lxml,
html5lib,
tinycss,
zopfli,
glib,
harfbuzz,
pango,
fontconfig,
lib, stdenv,
ghostscript,
pytest,
pytest-runner,
pytest-isort,
pytest-flake8,
pytest-cov,
isPy3k,
substituteAll
{ buildPythonPackage
, fetchPypi
, fetchpatch
, pytestCheckHook
, brotli
, cairosvg
, fonttools
, pydyf
, pyphen
, cffi
, cssselect
, lxml
, html5lib
, tinycss
, zopfli
, glib
, harfbuzz
, pango
, fontconfig
, lib
, stdenv
, ghostscript
, isPy3k
, substituteAll
}:
buildPythonPackage rec {
@ -33,26 +29,25 @@ buildPythonPackage rec {
version = "53.4";
disabled = !isPy3k;
pytestFlagsArray = [
# setup.py is auto-generated and doesn't pass the flake8 check
"--ignore=setup.py"
# ffi.py is patched by us and doesn't pass the flake8 check
"--ignore=weasyprint/text/ffi.py"
];
src = fetchPypi {
inherit version;
pname = "weasyprint";
sha256 = "sha256-EMyxfVXHMJa98e3T7+WMuFWwfkwwfZutTryaPxP/RYA=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--isort --flake8 --cov --no-cov-on-fail" ""
'';
disabledTests = [
# test_font_stretch needs the Ahem font (fails on macOS)
# needs the Ahem font (fails on macOS)
"test_font_stretch"
];
checkInputs = [
pytestCheckHook
ghostscript
pytest
pytest-runner
pytest-isort
pytest-flake8
pytest-cov
];
FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf";
@ -83,12 +78,6 @@ buildPythonPackage rec {
})
];
src = fetchPypi {
inherit version;
pname = "weasyprint";
sha256 = "sha256-EMyxfVXHMJa98e3T7+WMuFWwfkwwfZutTryaPxP/RYA=";
};
meta = with lib; {
homepage = "https://weasyprint.org/";
description = "Converts web documents to PDF";

Loading…
Cancel
Save