Unverified Commit 79c799f5 authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

Merge pull request #257044 from t4ccer/t4/add-radon

python3Packages.radon: init at 6.0.1
parents 8c9e646f be295800
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
# Python deps
, six
, setuptools
}:

buildPythonPackage rec {
  pname = "mando";
  version = "0.7.1";

  pyproject = true;

  src = fetchFromGitHub {
    owner = "rubik";
    repo = "mando";
    rev = "v${version}";
    hash = "sha256-Ylrrfo57jqGuWEqCa5RyTT9AagBpUvAfviHkyJPFv08=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  propagatedBuildInputs = [
    six
  ];

  pythonImportsCheck = [
    "mando"
  ];

  meta = with lib; {
    description = "Create Python CLI apps with little to no effort at all";
    homepage = "https://mando.readthedocs.org";
    changelog = "https://github.com/rubik/mando/blob/v${version}/CHANGELOG";
    license = licenses.mit;
    maintainers = with maintainers; [ t4ccer ];
  };
}
+67 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, fetchpatch
# Python deps
, mando
, colorama
, pytest-mock
, tomli
, poetry-core
}:

buildPythonPackage rec {
  pname = "radon";
  version = "6.0.1";

  pyproject = true;

  src = fetchFromGitHub {
    owner = "rubik";
    repo = "radon";
    rev = "v${version}";
    hash = "sha256-yY+j9kuX0ou/uDoVI/Qfqsmq0vNHv735k+vRl22LwwY=";
  };

  patches = [
    # NOTE: Remove after next release
    (fetchpatch {
      url = "https://github.com/rubik/radon/commit/ce5d2daa0a9e0e843059d6f57a8124c64a87a6dc.patch";
      hash = "sha256-WwcfR2ZEWeRiMKdMZAwtZRBcWOqoqpaVTmVo0k+Tn74=";
    })
  ];

  nativeBuildInputs = [
    poetry-core
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-mock
  ];

  propagatedBuildInputs = [
    mando
    colorama
  ];

  passthru.optional-dependencies = {
    toml = [
      tomli
    ];
  };

  pythonImportsCheck = [
    "radon"
  ];

  meta = with lib; {
    description = "Various code metrics for Python code";
    homepage = "https://radon.readthedocs.org";
    changelog = "https://github.com/rubik/radon/blob/v${version}/CHANGELOG";
    license = licenses.mit;
    maintainers = with maintainers; [ t4ccer ];
    mainProgram = "radon";
  };
}
+4 −0
Original line number Diff line number Diff line
@@ -6477,6 +6477,8 @@ self: super: with self; {
  managesieve = callPackage ../development/python-modules/managesieve { };
  mando = callPackage ../development/python-modules/mando { };
  mandown = callPackage ../development/python-modules/mandown { };
  manhole = callPackage ../development/python-modules/manhole { };
@@ -11912,6 +11914,8 @@ self: super: with self; {
  radish-bdd = callPackage ../development/python-modules/radish-bdd { };
  radon = callPackage ../development/python-modules/radon { };
  railroad-diagrams = callPackage ../development/python-modules/railroad-diagrams { };
  rainbowstream = callPackage ../development/python-modules/rainbowstream { };