python3Packages.beziers: fix darwin build (#423150)

authored by Aleksana and committed by GitHub 097cb949 663743bf

+24 -12
+24 -12
pkgs/development/python-modules/beziers/default.nix
··· 1 1 { 2 2 lib, 3 + stdenv, 3 4 buildPythonPackage, 4 5 fetchFromGitHub, 5 6 dotmap, 6 7 matplotlib, 7 8 pyclipper, 8 - unittestCheckHook, 9 + pytestCheckHook, 10 + pythonImportsCheckHook, 11 + setuptools, 9 12 gitUpdater, 10 13 }: 11 14 12 15 buildPythonPackage rec { 13 16 pname = "beziers"; 14 17 version = "0.6.0"; 15 - format = "setuptools"; 18 + pyproject = true; 16 19 17 - # PyPI doesn't have a proper source tarball, fetch from Github instead 18 20 src = fetchFromGitHub { 19 21 owner = "simoncozens"; 20 22 repo = "beziers.py"; ··· 22 24 hash = "sha256-NjmWsRz/NPPwXPbiSaOeKJMrYmSyNTt5ikONyAljgvM="; 23 25 }; 24 26 25 - propagatedBuildInputs = [ pyclipper ]; 27 + build-system = [ setuptools ]; 28 + 29 + dependencies = [ pyclipper ]; 30 + 31 + preCheck = '' 32 + # silence matplotlib warning 33 + export MPLCONFIGDIR=$(mktemp -d) 34 + ''; 26 35 27 36 nativeCheckInputs = [ 28 37 dotmap 29 38 matplotlib 30 - unittestCheckHook 39 + pytestCheckHook 40 + pythonImportsCheckHook 31 41 ]; 32 - unittestFlagsArray = [ 33 - "-s" 34 - "test" 35 - "-v" 42 + 43 + disabledTests = lib.optionals stdenv.isDarwin [ 44 + # Fails on macOS with Trace/BPT trap: 5 - something to do with recursion depth 45 + "test_cubic_cubic" 36 46 ]; 47 + 48 + pythonImportsCheckFlags = [ "beziers" ]; 37 49 38 50 passthru.updateScript = gitUpdater { rev-prefix = "v"; }; 39 51 40 - meta = with lib; { 52 + meta = { 41 53 description = "Python library for manipulating Bezier curves and paths in fonts"; 42 54 homepage = "https://github.com/simoncozens/beziers.py"; 43 - license = licenses.mit; 44 - maintainers = with maintainers; [ danc86 ]; 55 + license = lib.licenses.mit; 56 + maintainers = with lib.maintainers; [ danc86 ]; 45 57 }; 46 58 }