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