mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
python3Packages.psautohint: fix build
Prunes dependencies, migrates to finalAttrs and a PEP517 build.
This commit is contained in:
parent
9fbb46976d
commit
7d288b00ad
1 changed files with 14 additions and 13 deletions
|
|
@ -2,10 +2,9 @@
|
|||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fonttools,
|
||||
lxml,
|
||||
fs, # for fonttools extras
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
fonttools,
|
||||
pytestCheckHook,
|
||||
pytest-cov-stub,
|
||||
pytest-xdist,
|
||||
|
|
@ -13,31 +12,32 @@
|
|||
psautohint, # for passthru.tests
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "psautohint";
|
||||
version = "2.4.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "adobe-type-tools";
|
||||
repo = "psautohint";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
sha256 = "125nx7accvbk626qlfar90va1995kp9qfrz6a978q4kv2kk37xai";
|
||||
fetchSubmodules = true; # data dir for tests
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
echo '#define PSAUTOHINT_VERSION "${version}"' > libpsautohint/src/version.h
|
||||
echo '#define PSAUTOHINT_VERSION "${finalAttrs.version}"' > libpsautohint/src/version.h
|
||||
sed -i '/use_scm_version/,+3d' setup.py
|
||||
sed -i '/setup(/a \ version="${version}",' setup.py
|
||||
sed -i '/setup(/a \ version="${finalAttrs.version}",' setup.py
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
fonttools
|
||||
lxml
|
||||
fs
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
|
|
@ -45,6 +45,7 @@ buildPythonPackage rec {
|
|||
pytest-cov-stub
|
||||
pytest-xdist
|
||||
];
|
||||
|
||||
disabledTests = lib.optionals (!runAllTests) [
|
||||
# Slow tests, reduces test time from ~5 mins to ~30s
|
||||
"test_mmufo"
|
||||
|
|
@ -69,4 +70,4 @@ buildPythonPackage rec {
|
|||
license = lib.licenses.bsd3;
|
||||
maintainers = [ lib.maintainers.sternenseemann ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue