evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / pypng / default.nix
blobeb06d04b5dbe736b90e0e09fab4206e59d394840
2   lib,
3   buildPythonPackage,
4   fetchFromGitLab,
5   pytestCheckHook,
6   setuptools,
7 }:
9 buildPythonPackage rec {
10   pname = "pypng";
11   version = "0.20220715.0";
12   pyproject = true;
14   src = fetchFromGitLab {
15     owner = "drj11";
16     repo = "pypng";
17     rev = "refs/tags/${pname}-${version}";
18     hash = "sha256-tTnsGCAmHexDWm/T5xpHpcBaQcBEqMfTFaoOAeC+pDs=";
19   };
21   nativeBuildInputs = [ setuptools ];
23   patches = [
24     # pngsuite is imported by code/test_png.py but is not defined in
25     # setup.cfg, so it isn't built - this adds it to py_modules
26     ./setup-cfg-pngsuite.patch
27   ];
29   # allow tests to use the binaries produced by this package
30   preCheck = ''
31     export PATH="$out/bin:$PATH"
32   '';
34   pythonImportsCheck = [
35     "png"
36     "pngsuite"
37   ];
39   nativeCheckInputs = [ pytestCheckHook ];
41   meta = with lib; {
42     description = "Pure Python library for PNG image encoding/decoding";
43     homepage = "https://github.com/drj11/pypng";
44     license = licenses.mit;
45     maintainers = with maintainers; [ prusnak ];
46   };