git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #146516 from SuperSandro2000/python

python39Packages.{pydyf,weasyprint}: remove extra pytest, remove linting only tests, format to standard pythonPackages layout

commitdcf968b85c8cb843c0c8da1c2a658997a566327c authorThiago Kenji Okada <thiagokokada@gmail.com> dateThu 18 Nov 2021, 17:38 (5 years ago) parent9c177f08bc4944
2 files changed+53−72
pkgs/development/python-modules/pydyf/default.nix+18−26 pkgs/development/python-modules/weasyprint/default.nix+35−46
pkgs/development/python-modules/pydyf/default.nix+18−26
@@ -1,15 +1,11 @@
1−{ lib,
2− buildPythonPackage,
3− fetchPypi,
4− isPy3k,
5− pytestCheckHook,
6− coverage,
7− ghostscript,
8− pillow,
9− pytest,
10− pytest-cov,
11− pytest-flake8,
12− pytest-isort
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, isPy3k
5+, pytestCheckHook
6+, coverage
7+, ghostscript
8+, pillow
139}:
1410
1511buildPythonPackage rec {
@@ -17,28 +13,24 @@ buildPythonPackage rec {
1713 version = "0.1.2";
1814 disabled = !isPy3k;
1915
20− pytestFlagsArray = [
21− # setup.py is auto-generated and doesn't pass the flake8 check
22− "--ignore=setup.py"
23− ];
16+ src = fetchPypi {
17+ inherit version;
18+ pname = "pydyf";
19+ sha256 = "sha256-Hi9d5IF09QXeAlp9HnzwG73ZQiyoq5RReCvwDuF4YCw=";
20+ };
21+
22+ postPatch = ''
23+ substituteInPlace pyproject.toml \
24+ --replace "--isort --flake8 --cov --no-cov-on-fail" ""
25+ '';
2426
2527 checkInputs = [
2628 pytestCheckHook
2729 coverage
2830 ghostscript
2931 pillow
30− pytest
31− pytest-cov
32− pytest-flake8
33− pytest-isort
3432 ];
3533
36− src = fetchPypi {
37− inherit version;
38− pname = "pydyf";
39− sha256 = "sha256-Hi9d5IF09QXeAlp9HnzwG73ZQiyoq5RReCvwDuF4YCw=";
40− };
41−
4234 meta = with lib; {
4335 homepage = "https://doc.courtbouillon.org/pydyf/stable/";
4436 description = "Low-level PDF generator written in Python and based on PDF specification 1.7";
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";