git.iko.soy/typeable/nixpkgs
on master help sign in
python39Packages.weasyprint: remove extra pytest, remove linting only tests, format to standard pythonPackages layout, clarify test comment which is also true for linux
commit8bc4944f274d6a872fad2c31e7ff75d7ad7534a2 authorSandro Jäckel <sandro.jaeckel@gmail.com> dateThu 18 Nov 2021, 18:49 (5 years ago) parent412899f
1 file changed+35−46
pkgs/development/python-modules/weasyprint/default.nix+35−46
pkgs/development/python-modules/weasyprint/default.nix+35−46
@@ -1,31 +1,27 @@
1−{ buildPythonPackage,
2− fetchPypi,
3− fetchpatch,
4− pytestCheckHook,
5− brotli,
6− cairosvg,
7− fonttools,
8− pydyf,
9− pyphen,
10− cffi,
11− cssselect,
12− lxml,
13− html5lib,
14− tinycss,
15− zopfli,
16− glib,
17− harfbuzz,
18− pango,
19− fontconfig,
20− lib, stdenv,
21− ghostscript,
22− pytest,
23− pytest-runner,
24− pytest-isort,
25− pytest-flake8,
26− pytest-cov,
27− isPy3k,
28− substituteAll
1+{ buildPythonPackage
2+, fetchPypi
3+, fetchpatch
4+, pytestCheckHook
5+, brotli
6+, cairosvg
7+, fonttools
8+, pydyf
9+, pyphen
10+, cffi
11+, cssselect
12+, lxml
13+, html5lib
14+, tinycss
15+, zopfli
16+, glib
17+, harfbuzz
18+, pango
19+, fontconfig
20+, lib
21+, stdenv
22+, ghostscript
23+, isPy3k
24+, substituteAll
2925}:
3026
3127buildPythonPackage rec {
@@ -33,26 +29,25 @@ buildPythonPackage rec {
3329 version = "53.4";
3430 disabled = !isPy3k;
3531
36− pytestFlagsArray = [
37− # setup.py is auto-generated and doesn't pass the flake8 check
38− "--ignore=setup.py"
39− # ffi.py is patched by us and doesn't pass the flake8 check
40− "--ignore=weasyprint/text/ffi.py"
41− ];
32+ src = fetchPypi {
33+ inherit version;
34+ pname = "weasyprint";
35+ sha256 = "sha256-EMyxfVXHMJa98e3T7+WMuFWwfkwwfZutTryaPxP/RYA=";
36+ };
37+
38+ postPatch = ''
39+ substituteInPlace pyproject.toml \
40+ --replace "--isort --flake8 --cov --no-cov-on-fail" ""
41+ '';
4242
4343 disabledTests = [
44− # test_font_stretch needs the Ahem font (fails on macOS)
44+ # needs the Ahem font (fails on macOS)
4545 "test_font_stretch"
4646 ];
4747
4848 checkInputs = [
4949 pytestCheckHook
5050 ghostscript
51− pytest
52− pytest-runner
53− pytest-isort
54− pytest-flake8
55− pytest-cov
5651 ];
5752
5853 FONTCONFIG_FILE = "${fontconfig.out}/etc/fonts/fonts.conf";
@@ -83,12 +78,6 @@ buildPythonPackage rec {
8378 })
8479 ];
8580
86− src = fetchPypi {
87− inherit version;
88− pname = "weasyprint";
89− sha256 = "sha256-EMyxfVXHMJa98e3T7+WMuFWwfkwwfZutTryaPxP/RYA=";
90− };
91−
9281 meta = with lib; {
9382 homepage = "https://weasyprint.org/";
9483 description = "Converts web documents to PDF";