2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
|
|
|
, freetype
|
|
|
|
, pillow
|
2023-11-16 04:20:00 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
, glibcLocales
|
|
|
|
, python
|
|
|
|
, isPyPy
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
ft = freetype.overrideAttrs (oldArgs: { dontDisableStatic = true; });
|
|
|
|
in buildPythonPackage rec {
|
|
|
|
pname = "reportlab";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "4.0.7";
|
2023-11-16 04:20:00 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
# See https://bitbucket.org/pypy/compatibility/wiki/reportlab%20toolkit
|
|
|
|
disabled = isPyPy;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-lnx38A79kYzCMc+LbY9OR33Jc7XBZVfjvRjfrrWnAjQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Remove all the test files that require access to the internet to pass.
|
|
|
|
rm tests/test_lib_utils.py
|
|
|
|
rm tests/test_platypus_general.py
|
|
|
|
rm tests/test_platypus_images.py
|
|
|
|
|
|
|
|
# Remove the tests that require Vera fonts installed
|
|
|
|
rm tests/test_graphics_render.py
|
2020-08-20 17:08:02 +00:00
|
|
|
rm tests/test_graphics_charts.py
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
ft
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pillow
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
glibcLocales
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
2023-11-16 04:20:00 +00:00
|
|
|
runHook preCheck
|
|
|
|
pushd tests
|
2020-04-24 23:36:52 +00:00
|
|
|
LC_ALL="en_US.UTF-8" ${python.interpreter} runAll.py
|
2023-11-16 04:20:00 +00:00
|
|
|
popd
|
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An Open Source Python library for generating PDFs and graphics";
|
|
|
|
homepage = "http://www.reportlab.com/";
|
2023-11-16 04:20:00 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|