2020-09-25 04:45:31 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
2020-12-25 13:55:36 +00:00
|
|
|
, fonttools
|
|
|
|
, lxml, fs # for fonttools extras
|
2020-09-25 04:45:31 +00:00
|
|
|
, setuptools_scm
|
2021-02-19 19:06:45 +00:00
|
|
|
, pytestCheckHook, pytestcov, pytest_xdist
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "psautohint";
|
2021-02-24 18:30:23 +00:00
|
|
|
version = "2.3.0";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-12-25 13:55:36 +00:00
|
|
|
owner = "adobe-type-tools";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-02-24 18:30:23 +00:00
|
|
|
sha256 = "1y7mqc2myn1gfzg4h018f8xza0q535shnqg6snnaqynz20i8jcfh";
|
2020-09-25 04:45:31 +00:00
|
|
|
fetchSubmodules = true; # data dir for tests
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
echo '#define PSAUTOHINT_VERSION "${version}"' > libpsautohint/src/version.h
|
|
|
|
sed -i '/use_scm_version/,+3d' setup.py
|
|
|
|
sed -i '/setup(/a \ version="${version}",' setup.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ setuptools_scm ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ fonttools lxml fs ];
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
checkInputs = [
|
2021-02-19 19:06:45 +00:00
|
|
|
pytestCheckHook
|
2020-12-25 13:55:36 +00:00
|
|
|
pytestcov
|
|
|
|
pytest_xdist
|
|
|
|
];
|
|
|
|
disabledTests = [
|
2021-02-19 19:06:45 +00:00
|
|
|
# Test that fails on pytest >= v6
|
|
|
|
# https://github.com/adobe-type-tools/psautohint/issues/284#issuecomment-742800965
|
|
|
|
"test_hashmap_old_version"
|
2020-12-25 13:55:36 +00:00
|
|
|
# Slow tests, reduces test time from ~5 mins to ~30s
|
|
|
|
"test_mmufo"
|
|
|
|
"test_flex_ufo"
|
|
|
|
"test_ufo"
|
|
|
|
"test_flex_otf"
|
|
|
|
"test_multi_outpath"
|
|
|
|
"test_mmhint"
|
|
|
|
"test_otf"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Script to normalize the XML and other data inside of a UFO";
|
|
|
|
homepage = "https://github.com/adobe-type-tools/psautohint";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.sternenseemann ];
|
|
|
|
};
|
|
|
|
}
|