2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
chardet,
|
|
|
|
fetchPypi,
|
|
|
|
freetype,
|
|
|
|
pillow,
|
|
|
|
setuptools,
|
|
|
|
glibcLocales,
|
|
|
|
python,
|
|
|
|
isPyPy,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2024-06-05 15:53:02 +00:00
|
|
|
ft = freetype.overrideAttrs (oldArgs: {
|
|
|
|
dontDisableStatic = true;
|
|
|
|
});
|
|
|
|
in
|
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "reportlab";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "4.2.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
# 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-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-R0+yjWNDGl1H11yQ1YA5MFDffUkaCceHffMpGi6fbQo=";
|
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
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ ft ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
chardet
|
2023-11-16 04:20:00 +00:00
|
|
|
pillow
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ glibcLocales ];
|
2023-11-16 04:20:00 +00:00
|
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = "https://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
|
|
|
};
|
|
|
|
}
|