1 { lib, buildPythonPackage, fetchFromGitHub, pythonOlder
3 , lxml, fs # for fonttools extras
5 , pytestCheckHook, pytest-cov, pytest-xdist
6 , runAllTests ? false, psautohint # for passthru.tests
9 buildPythonPackage rec {
12 format = "setuptools";
14 disabled = pythonOlder "3.7";
16 src = fetchFromGitHub {
17 owner = "adobe-type-tools";
20 sha256 = "125nx7accvbk626qlfar90va1995kp9qfrz6a978q4kv2kk37xai";
21 fetchSubmodules = true; # data dir for tests
25 echo '#define PSAUTOHINT_VERSION "${version}"' > libpsautohint/src/version.h
26 sed -i '/use_scm_version/,+3d' setup.py
27 sed -i '/setup(/a \ version="${version}",' setup.py
30 nativeBuildInputs = [ setuptools-scm ];
32 propagatedBuildInputs = [ fonttools lxml fs ];
39 disabledTests = lib.optionals (!runAllTests) [
40 # Slow tests, reduces test time from ~5 mins to ~30s
48 # flaky tests (see https://github.com/adobe-type-tools/psautohint/issues/385)
49 "test_hashmap_old_version"
50 "test_hashmap_no_version"
54 fullTestsuite = psautohint.override { runAllTests = true; };
58 description = "Script to normalize the XML and other data inside of a UFO";
59 homepage = "https://github.com/adobe-type-tools/psautohint";
60 license = licenses.bsd3;
61 maintainers = [ maintainers.sternenseemann ];