diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/reportlab/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/reportlab/default.nix | 49 |
1 files changed, 30 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/reportlab/default.nix b/nixpkgs/pkgs/development/python-modules/reportlab/default.nix index 608debea5693..664d87040c45 100644 --- a/nixpkgs/pkgs/development/python-modules/reportlab/default.nix +++ b/nixpkgs/pkgs/development/python-modules/reportlab/default.nix @@ -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; [ ]; }; } |