Unverified Commit 799bc8d7 authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

Merge pull request #330725 from emilazy/push-lsuzwplvkpsw

nose2pytest: init at 1.0.12
parents c7fc9b3b cb973365
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
{ python3Packages }:

python3Packages.toPythonApplication python3Packages.nose2pytest
+45 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  flit-core,
  appdirs,
  pytestCheckHook,
}:

let
  version = "24.4.24";
in

buildPythonPackage {
  pname = "fissix";
  inherit version;
  pyproject = true;

  src = fetchFromGitHub {
    owner = "amyreese";
    repo = "fissix";
    rev = "v${version}";
    hash = "sha256-geGctke+1PWFqJyiH1pQ0zWj9wVIjV/SQ5njOOk9gOw=";
  };

  build-system = [ flit-core ];

  dependencies = [ appdirs ];

  nativeCheckInputs = [ pytestCheckHook ];

  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  pythonImportsCheck = [ "fissix" ];

  meta = {
    description = "Backport of latest lib2to3, with enhancements";
    homepage = "https://github.com/amyreese/fissix";
    sourceProvenance = [ lib.sourceTypes.fromSource ];
    license = lib.licenses.psfl;
    maintainers = [ lib.maintainers.emily ];
  };
}
+61 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch2,
  setuptools,
  fissix,
  pytestCheckHook,
  nose,
}:

let
  version = "1.0.12";
in

buildPythonPackage {
  pname = "nose2pytest";
  inherit version;
  pyproject = true;

  src = fetchFromGitHub {
    owner = "pytest-dev";
    repo = "nose2pytest";
    rev = "v${version}";
    hash = "sha256-BYyj2ZOZvWBpmzQACpmxAzCdQhlZlDYt+HLMdft+wYY=";
  };

  patches = [
    # Drop Python 3.6 and 3.7 support
    #
    # Relaxes the runtime check for Python < 3.12.
    (fetchpatch2 {
      url = "https://github.com/pytest-dev/nose2pytest/commit/75ff506aaf11b5e20672441730657ee7540387e1.patch?full_index=1";
      hash = "sha256-BpazrsB4b1oMBx9OemdVxhj/Jqbc8RKv2GC6gqkdGK8=";
    })
  ];

  build-system = [ setuptools ];

  dependencies = [ fissix ];

  nativeCheckInputs = [
    pytestCheckHook
    nose
  ];

  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  pythonImportsCheck = [ "nose2pytest.assert_tools" ];

  meta = {
    description = "Scripts to convert Python Nose tests to PyTest";
    homepage = "https://github.com/pytest-dev/nose2pytest";
    sourceProvenance = [ lib.sourceTypes.fromSource ];
    license = lib.licenses.bsd3;
    maintainers = [ lib.maintainers.emily ];
    mainProgram = "nose2pytest";
  };
}
+4 −0
Original line number Diff line number Diff line
@@ -4340,6 +4340,8 @@ self: super: with self; {
  first = callPackage ../development/python-modules/first { };
  fissix = callPackage ../development/python-modules/fissix { };
  fitbit = callPackage ../development/python-modules/fitbit { };
  fivem-api = callPackage ../development/python-modules/fivem-api { };
@@ -9130,6 +9132,8 @@ self: super: with self; {
  nose2 = callPackage ../development/python-modules/nose2 { };
  nose2pytest = callPackage ../development/python-modules/nose2pytest { };
  nose3 = callPackage ../development/python-modules/nose3 { };
  notebook = callPackage ../development/python-modules/notebook { };