1{ lib
2, buildPythonPackage
3, fetchPypi
4, fetchFromGitHub
5, numpy
6, pybind11
7, pytestCheckHook
8, setuptools
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 pname = "mapbox-earcut";
14 version = "1.0.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "skogler";
21 repo = "mapbox_earcut_python";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-+Vxvo++bkoCsJFmt/u1eaqhgpz8Uddz06iIi66ju+MQ=";
24 };
25
26 nativeBuildInputs = [
27 setuptools
28 pybind11
29 ];
30
31 propagatedBuildInputs = [
32 numpy
33 ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [
40 "mapbox_earcut"
41 ];
42
43 meta = with lib; {
44 homepage = "https://github.com/skogler/mapbox_earcut_python";
45 changelog = "https://github.com/skogler/mapbox_earcut_python/releases/tag/v${version}";
46 license = licenses.isc;
47 description = "Mapbox-earcut fast triangulation of 2D-polygons";
48 longDescription = ''
49 Python bindings for the C++ implementation of the Mapbox Earcut
50 library, which provides very fast and quite robust triangulation of 2D
51 polygons.
52 '';
53 maintainers = with maintainers; [ friedelino ];
54 };
55}