python312Packages.pint-xarray: init at 0.4 (#377344)
[NixPkgs.git] / pkgs / development / python-modules / compreffor / default.nix
blob5cf9169bb1a32aa09ad9f903c08d39d7032e2890
2   lib,
3   buildPythonPackage,
4   cython,
5   fetchPypi,
6   setuptools-scm,
7   fonttools,
8   pytestCheckHook,
9 }:
11 buildPythonPackage rec {
12   pname = "compreffor";
13   version = "0.5.6";
14   pyproject = true;
16   src = fetchPypi {
17     inherit pname version;
18     hash = "sha256-icE9GDf5SD/gmqZrGe30SQ7ghColye3VIytSXaI/EA4=";
19   };
21   postPatch = ''
22     substituteInPlace pyproject.toml \
23       --replace-fail '"setuptools_git_ls_files",' ""
24     substituteInPlace setup.py \
25       --replace-fail ', "setuptools_git_ls_files"' ""
26   '';
28   build-system = [
29     cython
30     setuptools-scm
31   ];
33   dependencies = [ fonttools ];
35   nativeCheckInputs = [ pytestCheckHook ];
37   preCheck = ''
38     # import from $out
39     mv src/python/compreffor/test .
40     rm -r src tools
41   '';
43   pythonImportsCheck = [ "compreffor" ];
45   meta = with lib; {
46     changelog = "https://github.com/googlefonts/compreffor/releases/tag/${version}";
47     description = "CFF table subroutinizer for FontTools";
48     mainProgram = "compreffor";
49     homepage = "https://github.com/googlefonts/compreffor";
50     license = licenses.asl20;
51     maintainers = [ ];
52   };