Commit d9a7ea80 authored by Jonas Heinrich's avatar Jonas Heinrich Committed by sternenseemann
Browse files

python3Packages.afdko: 3.9.0 -> 3.9.2

parent c956f85f
Loading
Loading
Loading
Loading
+34 −20
Original line number Diff line number Diff line
{ lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, pythonOlder
, fonttools, defcon, lxml, fs, unicodedata2, zopfli, brotlipy, fontpens
, brotli, fontmath, mutatormath, booleanoperations
, ufoprocessor, ufonormalizer, psautohint, tqdm
, setuptools-scm, scikit-build
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, fetchpatch
, pythonOlder
, fonttools
, defcon
, lxml
, fs
, unicodedata2
, zopfli
, brotlipy
, fontpens
, brotli
, fontmath
, mutatormath
, booleanoperations
, ufoprocessor
, ufonormalizer
, psautohint
, tqdm
, setuptools-scm
, scikit-build
, cmake
, antlr4_9
, libxml2
@@ -14,17 +33,16 @@

buildPythonPackage rec {
  pname = "afdko";
  version = "3.9.0";
  version = "3.9.2";
  format = "pyproject";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1fjsaz6bp028fbmry6fzfcih78mdzycqmky1wsz5y0bg4kfk4shh";
    sha256 = "sha256-3JEnQbS4CtZEqAb+/ngqkO+nv9SZ0Zi8sPJLyW+tQ9w=";
  };

  format = "pyproject";

  nativeBuildInputs = [
    setuptools-scm
    scikit-build
@@ -42,8 +60,6 @@ buildPythonPackage rec {

    # Use antlr4 runtime from nixpkgs and link it dynamically
    ./use-dynamic-system-antlr4-runtime.patch

    ./libxml2-cmake-find-package.patch
  ];

  # setup.py will always (re-)execute cmake in buildPhase
@@ -68,14 +84,15 @@ buildPythonPackage rec {
    tqdm
  ];

  # Use system libxml2
  FORCE_SYSTEM_LIBXML2 = true;

  checkInputs = [ pytestCheckHook ];

  preCheck = ''
    export PATH=$PATH:$out/bin

    # Update tests to match ufinormalizer-0.6.1 expectations:
    #   https://github.com/adobe-type-tools/afdko/issues/1418
    find tests -name layerinfo.plist -delete
  '';

  disabledTests = lib.optionals (!runAllTests) [
    # Disable slow tests, reduces test time ~25 %
    "test_report"
@@ -91,10 +108,6 @@ buildPythonPackage rec {
    "test_spec"
  ] ++ lib.optionals (stdenv.hostPlatform.isi686) [
    "test_type1mm_inputs"
  ] ++ [
    # No longer succeeds in 2023
    # https://github.com/adobe-type-tools/afdko/issues/1589
    "test_ufo_fontinfo_parsing"
  ];

  passthru.tests = {
@@ -102,8 +115,9 @@ buildPythonPackage rec {
  };

  meta = with lib; {
    changelog = "https://github.com/adobe-type-tools/afdko/blob/${version}/NEWS.md";
    description = "Adobe Font Development Kit for OpenType";
    homepage = "https://adobe-type-tools.github.io/afdko/";
    homepage = "https://adobe-type-tools.github.io/afdko";
    license = licenses.asl20;
    maintainers = [ maintainers.sternenseemann ];
  };
+0 −22
Original line number Diff line number Diff line
commit c423d1ddf0345aed7ecaf4c8b9e1fa5108aafc6f
Author: sternenseemann <sternenseemann@systemli.org>
Date:   Sat Jul 2 12:35:56 2022 +0200

    Force use of CMake-shipped FindLibXml2 module
    
    This is needed to work around a nixpkgs bug:
    https://github.com/NixOS/nixpkgs/issues/125008

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a75b6fb1..c1408283 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,7 +42,7 @@ set(ANTLR4_TAG tags/4.9.3)
 find_path(ANTLR4_HEADER antlr4-runtime.h PATH_SUFFIXES antlr4-runtime)
 set(ANTLR4_INCLUDE_DIRS ${ANTLR4_HEADER})
 
-FIND_PACKAGE(LibXml2)
+FIND_PACKAGE(LibXml2 REQUIRED MODULE)
 IF (NOT ${LibXml2_FOUND})
    MESSAGE(STATUS "Could not locate LibXml2, will install externally.")
    set(LIBXML2_TAG tags/v2.9.13)