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