1{ lib 2, buildPythonPackage 3, fetchPypi 4, freetype 5, pillow 6, setuptools 7, glibcLocales 8, python 9, isPyPy 10}: 11 12let 13 ft = freetype.overrideAttrs (oldArgs: { dontDisableStatic = true; }); 14in buildPythonPackage rec { 15 pname = "reportlab"; 16 version = "4.0.4"; 17 format = "pyproject"; 18 19 # See https://bitbucket.org/pypy/compatibility/wiki/reportlab%20toolkit 20 disabled = isPyPy; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-f3CztWr/XxHLQTbFGg9aVv5uTI+7rHuQMHbbmajvMcE="; 25 }; 26 27 postPatch = '' 28 # Remove all the test files that require access to the internet to pass. 29 rm tests/test_lib_utils.py 30 rm tests/test_platypus_general.py 31 rm tests/test_platypus_images.py 32 33 # Remove the tests that require Vera fonts installed 34 rm tests/test_graphics_render.py 35 rm tests/test_graphics_charts.py 36 ''; 37 38 nativeBuildInputs = [ 39 setuptools 40 ]; 41 42 buildInputs = [ 43 ft 44 ]; 45 46 propagatedBuildInputs = [ 47 pillow 48 ]; 49 50 nativeCheckInputs = [ 51 glibcLocales 52 ]; 53 54 checkPhase = '' 55 runHook preCheck 56 pushd tests 57 LC_ALL="en_US.UTF-8" ${python.interpreter} runAll.py 58 popd 59 runHook postCheck 60 ''; 61 62 meta = with lib; { 63 description = "An Open Source Python library for generating PDFs and graphics"; 64 homepage = "http://www.reportlab.com/"; 65 license = licenses.bsd3; 66 maintainers = with maintainers; [ ]; 67 }; 68}