nixpkgs/pkgs/development/python-modules/pikepdf/default.nix
Ivan Kozik a1349065d6 python3Packages.pikepdf: 1.1.0 -> 1.6.2
pikepdf's tests work with the nixpkgs versions of pytest, attrs, and
hypothesis. I skipped bumping these to avoid mass rebuilds.

This fixes #67850.
2019-08-31 22:19:45 +00:00

75 lines
1.3 KiB
Nix

{ attrs
, buildPythonPackage
, defusedxml
, fetchPypi
, hypothesis
, isPy3k
, lxml
, pillow
, pybind11
, pytest
, pytest-helpers-namespace
, pytest-timeout
, pytest_xdist
, pytestrunner
, python-xmp-toolkit
, python3
, qpdf
, setuptools-scm-git-archive
, setuptools_scm
, stdenv
}:
buildPythonPackage rec {
pname = "pikepdf";
version = "1.6.2";
disabled = ! isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "1x1b55znr0j4fib69l2h0xq0qmbf2nbxwbwd4f7y8r4sqi20239z";
};
buildInputs = [
pybind11
qpdf
];
nativeBuildInputs = [
setuptools-scm-git-archive
setuptools_scm
];
checkInputs = [
attrs
hypothesis
pillow
pytest
pytest-helpers-namespace
pytest-timeout
pytest_xdist
pytestrunner
python-xmp-toolkit
];
propagatedBuildInputs = [ defusedxml lxml ];
postPatch = ''
sed -i \
-e 's/^pytest .*/pytest/g' \
-e 's/^attrs .*/attrs/g' \
-e 's/^hypothesis .*/hypothesis/g' \
requirements/test.txt
'';
preBuild = ''
HOME=$TMPDIR
'';
meta = with stdenv.lib; {
homepage = "https://github.com/pikepdf/pikepdf";
description = "Read and write PDFs with Python, powered by qpdf";
license = licenses.mpl20;
maintainers = [ maintainers.kiwi ];
};
}