1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 dotmap,
7 matplotlib,
8 pyclipper,
9 pytestCheckHook,
10 pythonImportsCheckHook,
11 setuptools,
12 gitUpdater,
13}:
14
15buildPythonPackage rec {
16 pname = "beziers";
17 version = "0.6.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "simoncozens";
22 repo = "beziers.py";
23 rev = "v${version}";
24 hash = "sha256-NjmWsRz/NPPwXPbiSaOeKJMrYmSyNTt5ikONyAljgvM=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [ pyclipper ];
30
31 preCheck = ''
32 # silence matplotlib warning
33 export MPLCONFIGDIR=$(mktemp -d)
34 '';
35
36 nativeCheckInputs = [
37 dotmap
38 matplotlib
39 pytestCheckHook
40 pythonImportsCheckHook
41 ];
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"
46 ];
47
48 pythonImportsCheckFlags = [ "beziers" ];
49
50 passthru.updateScript = gitUpdater { rev-prefix = "v"; };
51
52 meta = {
53 description = "Python library for manipulating Bezier curves and paths in fonts";
54 homepage = "https://github.com/simoncozens/beziers.py";
55 license = lib.licenses.mit;
56 maintainers = with lib.maintainers; [ danc86 ];
57 };
58}