Unverified Commit ae5f0bd7 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #232874 from fabaff/metar-bump

python310Packages.metar: 1.9.0 -> 1.10.0
parents 227b9a59 5e7b8176
Loading
Loading
Loading
Loading
+13 −22
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "metar";
  version = "1.9.0";
  version = "1.10.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "python-metar";
    repo = "python-metar";
    rev = "v${version}";
    hash = "sha256-pl2NWRfFCYyM2qvBt4Ic3wgbGkYZvAO6pX2Set8zYW8=";
    rev = "refs/tags/v${version}";
    hash = "sha256-53vgnViEYuMVKEnIZ2BNyIUrURR2rwopx7RWyFmF5PA=";
  };

  patches = [
    # Fix flapping test; https://github.com/python-metar/python-metar/issues/161
    (fetchpatch {
      url = "https://github.com/python-metar/python-metar/commit/716fa76682e6c2936643d1cf62e3d302ef29aedd.patch";
      hash = "sha256-y82NN+KDryOiH+eG+2ycXCO9lqQLsah4+YpGn6lM2As=";
      name = "fix_flapping_test.patch";
    })

    # Fix circumvent a sometimes impossible test
    # https://github.com/python-metar/python-metar/issues/165
    (fetchpatch {
      url = "https://github.com/python-metar/python-metar/commit/b675f4816d15fbfc27e23ba9a40cdde8bb06a552.patch";
      hash = "sha256-v+E3Ckwxb42mpGzi2C3ka96wHvurRNODMU3xLxDoVZI=";
      name = "fix_impossible_test.patch";
    })
  nativeCheckInputs = [
    pytestCheckHook
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "metar" ];
  pythonImportsCheck = [
    "metar"
  ];

  meta = with lib; {
    description = "Python parser for coded METAR weather reports";
    homepage = "https://github.com/python-metar/python-metar";
    changelog = "https://github.com/python-metar/python-metar/blob/v${version}/CHANGELOG.md";
    license = with licenses; [ bsd1 ];
    maintainers = with maintainers; [ fab ];
  };