2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
fetchpatch2,
|
|
|
|
pythonOlder,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
fonttools,
|
|
|
|
defcon,
|
|
|
|
fontmath,
|
|
|
|
booleanoperations,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
python,
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-02-29 20:09:43 +00:00
|
|
|
pname = "fontparts";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "0.12.1";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-02-29 20:09:43 +00:00
|
|
|
pname = "fontParts";
|
|
|
|
inherit version;
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-eeU13S1IcC+bsiK3YDlT4rVDeXDGcxx1wY/is8t5pCA=";
|
2020-09-25 04:45:31 +00:00
|
|
|
extension = "zip";
|
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch2 {
|
|
|
|
# replace remaining usage of assertEquals for Python 3.12 support
|
|
|
|
# https://github.com/robotools/fontParts/pull/720
|
|
|
|
url = "https://github.com/robotools/fontParts/commit/d7484cd98051aa1588683136da0bb99eac31523b.patch";
|
|
|
|
hash = "sha256-maoUgbmXY/RC4TUZI4triA9OIfB4T98qjUaQ94uhsbg=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs =
|
|
|
|
[
|
|
|
|
booleanoperations
|
|
|
|
defcon
|
|
|
|
fontmath
|
|
|
|
fonttools
|
|
|
|
]
|
|
|
|
++ defcon.optional-dependencies.pens
|
|
|
|
++ fonttools.optional-dependencies.ufo
|
|
|
|
++ fonttools.optional-dependencies.lxml
|
|
|
|
++ fonttools.optional-dependencies.unicode;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2021-02-16 17:04:54 +00:00
|
|
|
runHook preCheck
|
2020-09-25 04:45:31 +00:00
|
|
|
${python.interpreter} Lib/fontParts/fontshell/test.py
|
2021-02-16 17:04:54 +00:00
|
|
|
runHook postCheck
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "API for interacting with the parts of fonts during the font development process";
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://github.com/robotools/fontParts";
|
2022-06-16 17:23:12 +00:00
|
|
|
changelog = "https://github.com/robotools/fontParts/releases/tag/${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.sternenseemann ];
|
|
|
|
};
|
|
|
|
}
|