Unverified Commit bc1b3179 authored by TomaSajt's avatar TomaSajt
Browse files

python312Packages.pytest-shutil: 1.7.0 -> 1.7.1-unstable-2022-10-03

parent 0875b948
Loading
Loading
Loading
Loading
+24 −21
Original line number Diff line number Diff line
{ lib
, isPyPy
, buildPythonPackage
, fetchPypi
, pytest-fixture-config
, fetchpatch

# build
, pytest
# build-time
, setuptools
, setuptools-git

# runtime
, setuptools-git
, pytest
, mock
, path
, execnet
@@ -15,32 +17,34 @@
, six

# tests
, cmdline
, pytestCheckHook
 }:

buildPythonPackage rec {
  pname = "pytest-shutil";
  version = "1.7.0";
  format = "setuptools";
  inherit (pytest-fixture-config) version src;
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-2BZSYd5251CFBcNB2UwCsRPclj8nRUOrynTb+r0CEmE=";
  };
  sourceRoot = "${src.name}/pytest-shutil";

  postPatch = ''
    substituteInPlace setup.py \
      --replace "contextlib2" 'contextlib2;python_version<"3"' \
      --replace "path.py" "path"
  '';

  buildInputs = [
    pytest
  # imp was removed in Python 3.12
  patches = [
    (fetchpatch {
      name = "stop-using-imp.patch";
      url = "https://build.opensuse.org/public/source/openSUSE:Factory/python-pytest-shutil/stop-using-imp.patch?rev=10";
      hash = "sha256-L8tXoQ9q8o6aP3TpJY/sUVVbUd/ebw0h6de6dBj1WNY=";
      stripLen = 1;
    })
  ];

  propagatedBuildInputs = [
  build-system = [
    setuptools
    setuptools-git
  ];

  buildInputs = [ pytest ];

  dependencies = [
    mock
    path
    execnet
@@ -49,7 +53,6 @@ buildPythonPackage rec {
  ];

  nativeCheckInputs = [
    cmdline
    pytestCheckHook
  ];