From 35701f5c986f3594f12119f1ac1d54dbaf827516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 8 Aug 2024 06:16:02 -0700 Subject: [PATCH] python312Packages.cffsubr: 0.2.9.post1 -> 0.3.0 Changelog: https://github.com/adobe-type-tools/cffsubr/releases/tag/v0.3.0 --- .../python-modules/cffsubr/default.nix | 41 +++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/cffsubr/default.nix b/pkgs/development/python-modules/cffsubr/default.nix index 2498e6b5a751..c9642235e37e 100644 --- a/pkgs/development/python-modules/cffsubr/default.nix +++ b/pkgs/development/python-modules/cffsubr/default.nix @@ -1,40 +1,48 @@ { stdenv, lib, + afdko, buildPythonPackage, - fetchpatch, + cmake, + distutils, fetchPypi, fonttools, + ninja, pytestCheckHook, + scikit-build, + setuptools, setuptools-scm, - wheel, }: buildPythonPackage rec { pname = "cffsubr"; - version = "0.2.9.post1"; - format = "pyproject"; + version = "0.3.0"; + pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-azFBLc9JyPqEZkvahn4u3cVbb+b6aW/yU8TxOp/y/Fw="; + hash = "sha256-d0UVC9uBZ5+s3RHB87hwlsT029SVfo/Ou4jEVoeVLvs="; }; - patches = [ - # https://github.com/adobe-type-tools/cffsubr/pull/23 - (fetchpatch { - name = "remove-setuptools-git-ls-files.patch"; - url = "https://github.com/adobe-type-tools/cffsubr/commit/887a6a03b1e944b82fcb99b797fbc2f3a64298f0.patch"; - hash = "sha256-LuyqBtDrKWwCeckr+YafZ5nfVw1XnELwFI6X8bGomhs="; - }) - ]; + postPatch = '' + substituteInPlace setup.py \ + --replace-fail 'afdko_output_dir = os.path.join(afdko_root_dir, "build", "bin")' \ + 'afdko_output_dir = "${lib.getBin afdko}/bin"' \ + --replace-fail 'build_cmd=build_release_cmd' 'build_cmd="true"' + ''; - nativeBuildInputs = [ + build-system = [ + cmake + distutils + ninja + scikit-build + setuptools setuptools-scm - wheel ]; - propagatedBuildInputs = [ fonttools ]; + dontUseCmakeConfigure = true; + + dependencies = [ fonttools ]; nativeCheckInputs = [ pytestCheckHook ]; @@ -42,6 +50,7 @@ buildPythonPackage rec { meta = with lib; { broken = stdenv.isDarwin; + changelog = "https://github.com/adobe-type-tools/cffsubr/releases/tag/v${version}"; description = "Standalone CFF subroutinizer based on AFDKO tx"; mainProgram = "cffsubr"; homepage = "https://github.com/adobe-type-tools/cffsubr";