Unverified Commit 5a14f65a authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

oelint-adv: 6.7.1 -> 7.2.6 (#402760)

parents 01c5945d b6b69301
Loading
Loading
Loading
Loading
+14 −13
Original line number Diff line number Diff line
@@ -7,16 +7,24 @@

python3Packages.buildPythonApplication rec {
  pname = "oelint-adv";
  version = "6.7.1";
  version = "7.2.6";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "priv-kweihmann";
    repo = "oelint-adv";
    tag = version;
    hash = "sha256-rJ1M5YRXcKbDEGhy0G+N2dGD3sx8KFUfLJSLthYQNtU=";
    hash = "sha256-QNTC8jO6RjHNaHVNSqAoM1xAhYc35G5A7D0yfwmd6+U=";
  };

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

  build-system = with python3Packages; [
    setuptools
  ];
@@ -25,6 +33,7 @@ python3Packages.buildPythonApplication rec {
    anytree
    argcomplete
    colorama
    oelint-data
    oelint-parser
    urllib3
  ];
@@ -50,20 +59,12 @@ python3Packages.buildPythonApplication rec {

  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; {
  meta = {
    description = "Advanced bitbake-recipe linter";
    mainProgram = "oelint-adv";
    homepage = "https://github.com/priv-kweihmann/oelint-adv";
    changelog = "https://github.com/priv-kweihmann/oelint-adv/releases/tag/${version}";
    license = licenses.bsd2;
    maintainers = with maintainers; [ otavio ];
    license = lib.licenses.bsd2;
    maintainers = with lib.maintainers; [ otavio ];
  };
}
+28 −31
Original line number Diff line number Diff line
@@ -2,62 +2,59 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fontconfig,
  graphviz,
  poetry-core,
  pytest7CheckHook,
  pythonOlder,
  six,
  replaceVars,
  withGraphviz ? true,

  # build-system
  pdm-backend,

  # tests
  pytest-cov-stub,
  pytestCheckHook,
  pyyaml,
  test2ref,
  fontconfig,
}:

buildPythonPackage rec {
  pname = "anytree";
  version = "2.12.1";
  format = "pyproject";

  disabled = pythonOlder "3.7";
  version = "2.13.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "c0fec0de";
    repo = "anytree";
    tag = version;
    hash = "sha256-5HU8kR3B2RHiGBraQ2FTgVtGHJi+Lha9U/7rpNsYCCI=";
    hash = "sha256-kFNYJMWagpqixs84+AaNkh/28asLBJhibTP8LEEe4XY=";
  };

  patches = lib.optionals withGraphviz [
    (replaceVars ./graphviz.patch {
      inherit graphviz;
    })
  ];

  postPatch = ''
    # drop [project.urls] section, poetry-core 2.0 compat issue
    sed -i "/project\.urls/,+4d" pyproject.toml
    substituteInPlace src/anytree/exporter/dotexporter.py \
      --replace-fail \
        'cmd = ["dot"' \
        'cmd = ["${lib.getExe' graphviz "dot"}"'
  '';

  nativeBuildInputs = [ poetry-core ];

  propagatedBuildInputs = [ six ];
  build-system = [ pdm-backend ];

  nativeCheckInputs = [ pytest7CheckHook ];
  nativeCheckInputs = [
    pytest-cov-stub
    pytestCheckHook
    pyyaml
    test2ref
  ];

  # Tests print “Fontconfig error: Cannot load default config file”
  preCheck = lib.optionalString withGraphviz ''
  preCheck = ''
    export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
  '';

  # Circular dependency anytree → graphviz → pango → glib → gtk-doc → anytree
  doCheck = withGraphviz;

  pythonImportsCheck = [ "anytree" ];

  meta = with lib; {
  meta = {
    description = "Powerful and Lightweight Python Tree Data Structure";
    homepage = "https://github.com/c0fec0de/anytree";
    changelog = "https://github.com/c0fec0de/anytree/releases/tag/${version}";
    license = licenses.asl20;
    maintainers = with maitnainers; [ ];
    license = lib.licenses.asl20;
    maintainers = with lib.maitnainers; [ ];
  };
}
+0 −13
Original line number Diff line number Diff line
diff --git a/anytree/exporter/dotexporter.py b/anytree/exporter/dotexporter.py
index 9c10a68..209a952 100644
--- a/anytree/exporter/dotexporter.py
+++ b/anytree/exporter/dotexporter.py
@@ -228,7 +228,7 @@ class DotExporter(object):
             for line in self:
                 dotfile.write(("%s\n" % line).encode("utf-8"))
             dotfile.flush()
-            cmd = ["dot", dotfilename, "-T", fileformat, "-o", filename]
+            cmd = ["@graphviz@/bin/dot", dotfilename, "-T", fileformat, "-o", filename]
             check_call(cmd)
         try:
             remove(dotfilename)
+41 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  oelint-parser,
}:

buildPythonPackage rec {
  pname = "oelint-data";
  version = "1.0.10";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "priv-kweihmann";
    repo = "oelint-data";
    tag = version;
    hash = "sha256-lBy/aGxcmJ3v5f+0YAJtuk0IK4WpL5iFrgKjyoLswro=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    oelint-parser
  ];

  pythonImportsCheck = [ "oelint_data" ];

  # No tests
  doCheck = false;

  meta = {
    description = "Data for oelint-adv";
    homepage = "https://github.com/priv-kweihmann/oelint-data";
    changelog = "https://github.com/priv-kweihmann/oelint-data/releases/tag/${version}";
    license = lib.licenses.bsd2;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}
+45 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pdm-backend,
  binaryornot,
  pytest-cov-stub,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "test2ref";
  version = "0.8.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "nbiotcloud";
    repo = "test2ref";
    tag = "v${version}";
    hash = "sha256-Rgm7qZc1pFY/9gwzHjnI305Ch9enXzzWRsPZ7CQjzpQ=";
  };

  build-system = [
    pdm-backend
  ];

  dependencies = [
    binaryornot
  ];

  pythonImportsCheck = [ "test2ref" ];

  nativeCheckInputs = [
    pytest-cov-stub
    pytestCheckHook
  ];

  meta = {
    description = "Testing Against Learned Reference Data";
    homepage = "https://github.com/nbiotcloud/test2ref";
    changelog = "https://github.com/nbiotcloud/test2ref/releases/tag/v${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}
Loading