python3Packages.reportlab: 3.6.13 -> 4.0.4

This commit is contained in:
Martin Weinelt
2023-09-27 15:34:18 +02:00
parent 7d8ee1f015
commit 0fe12af6a9
@@ -3,6 +3,7 @@
, fetchPypi
, freetype
, pillow
, setuptools
, glibcLocales
, python
, isPyPy
@@ -12,26 +13,18 @@ let
ft = freetype.overrideAttrs (oldArgs: { dontDisableStatic = true; });
in buildPythonPackage rec {
pname = "reportlab";
version = "3.6.13";
version = "4.0.4";
format = "pyproject";
# See https://bitbucket.org/pypy/compatibility/wiki/reportlab%20toolkit
disabled = isPyPy;
src = fetchPypi {
inherit pname version;
hash = "sha256-b3XTP3o3IM9HNxq2PO0PDr0a622xk4aukviXegm+lhE=";
hash = "sha256-f3CztWr/XxHLQTbFGg9aVv5uTI+7rHuQMHbbmajvMcE=";
};
patches = [
./darwin-m1-compat.patch
];
nativeCheckInputs = [ glibcLocales ];
buildInputs = [ ft ];
propagatedBuildInputs = [ pillow ];
postPatch = ''
substituteInPlace setup.py \
--replace "mif = findFile(d,'ft2build.h')" "mif = findFile('${lib.getDev ft}','ft2build.h')"
# 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
@@ -42,16 +35,34 @@ in buildPythonPackage rec {
rm tests/test_graphics_charts.py
'';
nativeBuildInputs = [
setuptools
];
buildInputs = [
ft
];
propagatedBuildInputs = [
pillow
];
nativeCheckInputs = [
glibcLocales
];
checkPhase = ''
cd tests
runHook preCheck
pushd tests
LC_ALL="en_US.UTF-8" ${python.interpreter} runAll.py
popd
runHook postCheck
'';
# See https://bitbucket.org/pypy/compatibility/wiki/reportlab%20toolkit
disabled = isPyPy;
meta = {
meta = with lib; {
description = "An Open Source Python library for generating PDFs and graphics";
homepage = "http://www.reportlab.com/";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};
}