Unverified Commit 619d29bb authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

Merge pull request #333230 from dotlambda/python3Packages.cffsubr

python312Packages.cffsubr: 0.2.9.post1 -> 0.3.0
parents bc8402db 35701f5c
Loading
Loading
Loading
Loading
+26 −17
Original line number Diff line number Diff line
{
  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=";
    })
  ];

  nativeBuildInputs = [
  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"'
  '';

  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";