2020-09-25 04:45:31 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
|
|
|
, fonttools, lxml, fs
|
|
|
|
, setuptools_scm
|
|
|
|
, pytest, pytestcov, pytest_xdist, pytest-randomly
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "psautohint";
|
2020-11-09 15:59:12 +00:00
|
|
|
version = "2.1.2";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "adobe-type-tools";
|
|
|
|
repo = pname;
|
2020-11-09 15:59:12 +00:00
|
|
|
sha256 = "1s2l54gzn11y07zaggprwif7r3ia244qijjhkbvjdx4jsgc5df8n";
|
2020-09-25 04:45:31 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
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 ];
|
|
|
|
|
|
|
|
checkInputs = [ pytest pytestcov pytest_xdist pytest-randomly ];
|
|
|
|
checkPhase = "pytest tests";
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|