Merge pull request #232777 from fabaff/polyline-fix

python310Packages.polyline: modernize

authored by Fabian Affolter and committed by GitHub d4a9afba af2e1ca0

+34 -14
+34 -14
pkgs/development/python-modules/polyline/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 - , fetchPypi 4 - , six 5 - , flake8 6 - , nose 3 + , fetchFromGitHub 4 + , pytestCheckHook 5 + , pythonOlder 6 + , setuptools 7 7 }: 8 8 9 9 buildPythonPackage rec { 10 10 pname = "polyline"; 11 11 version = "2.0.0"; 12 + format = "pyproject"; 12 13 13 - src = fetchPypi { 14 - inherit pname version; 15 - hash = "sha256-FJK4/K3CFD+K7cZz08bZXfRRMfHGLrjVHIGDsk53FIY="; 14 + disabled = pythonOlder "3.7"; 15 + 16 + src = fetchFromGitHub { 17 + owner = "frederickjansen"; 18 + repo = pname; 19 + rev = "refs/tags/${version}"; 20 + hash = "sha256-e9ZDqcS3MaMlXi2a2JHI6NtRPqIV7rjsucGXEH6V8LA="; 16 21 }; 17 22 18 - propagatedBuildInputs = [ six ]; 19 - nativeCheckInputs = [ flake8 nose ]; 20 - checkPhase = '' 21 - nosetests 23 + postPatch = '' 24 + substituteInPlace pyproject.toml \ 25 + --replace " --cov=polyline --cov-report term-missing" "" 22 26 ''; 23 27 28 + nativeBuildInputs = [ 29 + setuptools 30 + ]; 31 + 32 + nativeCheckInputs = [ 33 + pytestCheckHook 34 + ]; 35 + 36 + pythonImportsCheck = [ 37 + "polyline" 38 + ]; 39 + 24 40 meta = with lib; { 25 - homepage = "https://github.com/hicsail/polyline"; 41 + description = "Python implementation of Google's Encoded Polyline Algorithm Format"; 42 + longDescription = '' 43 + polyline is a Python implementation of Google's Encoded Polyline Algorithm Format. It is 44 + essentially a port of https://github.com/mapbox/polyline. 45 + ''; 46 + homepage = "https://github.com/frederickjansen/polyline"; 47 + changelog = "https://github.com/frederickjansen/polyline/releases/tag/${version}"; 26 48 license = licenses.mit; 27 - description = "Python implementation of Google's Encoded Polyline Algorithm Format."; 28 - longDescription = "polyline is a Python implementation of Google's Encoded Polyline Algorithm Format (http://goo.gl/PvXf8Y). It is essentially a port of https://github.com/mapbox/polyline built with Python 2 and 3 support in mind."; 29 49 maintainers = with maintainers; [ ersin ]; 30 50 }; 31 51 }