Unverified Commit fa9f5ff0 authored by R. RyanTM's avatar R. RyanTM Committed by Nick Cao
Browse files

oelint-adv: 6.0.0 -> 6.1.0, fetch source from github, enable tests

parent 51a8ed13
Loading
Loading
Loading
Loading
+40 −16
Original line number Diff line number Diff line
{ lib
, nix-update-script
, python3
, fetchPypi
{
  lib,
  nix-update-script,
  python3Packages,
  fetchFromGitHub,
}:

python3.pkgs.buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
  pname = "oelint-adv";
  version = "6.0.0";
  format = "setuptools";
  version = "6.1.0";
  pyproject = true;

  src = fetchPypi {
    inherit version;
    pname = "oelint_adv";
    hash = "sha256-tN+DHLj/sey8CipQT5nnwym0JkiIkR8WJg2jKys+4Yk=";
  src = fetchFromGitHub {
    owner = "priv-kweihmann";
    repo = "oelint-adv";
    rev = "refs/tags/${version}";
    hash = "sha256-bDttjeHcIK90W7zPrKNAS4B1L9mibaRjQdnUAU2N8as=";
  };

  propagatedBuildInputs = with python3.pkgs; [
  build-system = with python3Packages; [
    setuptools
  ];

  dependencies = with python3Packages; [
    anytree
    argcomplete
    colorama
@@ -23,14 +29,32 @@ python3.pkgs.buildPythonApplication rec {
    urllib3
  ];

  pythonRelaxDeps = [ "urllib3" ];
  pythonImportsCheck = [ "oelint_adv" ];
  nativeCheckInputs = with python3Packages; [
    pytest-cov-stub
    pytest-forked
    pytest-xdist
    pytestCheckHook
  ];

  # Fail to run inside the code the build.
  doCheck = false;
  disabledTests = [
    # requires network access
    "TestClassOelintVarsHomepagePing"
  ];

  pythonRelaxDeps = [ "argcomplete" ];

  pythonImportsCheck = [ "oelint_adv" ];

  passthru.updateScript = nix-update-script { };

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace-fail "--random-order-bucket=global" "" \
      --replace-fail "--random-order"               "" \
      --replace-fail "--force-sugar"                "" \
      --replace-fail "--old-summary"                ""
  '';

  meta = with lib; {
    description = "Advanced bitbake-recipe linter";
    mainProgram = "oelint-adv";