forked from mirrors/nixpkgs
python3Packages.pytest: 6.2.5 -> 7.0.1
This commit is contained in:
parent
5ecb4b7874
commit
ac90f42389
|
@ -1,5 +1,4 @@
|
||||||
{ lib, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, isPyPy
|
{ lib, buildPythonPackage, pythonOlder, fetchPypi, isPy3k, isPyPy
|
||||||
, pythonAtLeast, fetchpatch
|
|
||||||
, atomicwrites
|
, atomicwrites
|
||||||
, attrs
|
, attrs
|
||||||
, hypothesis
|
, hypothesis
|
||||||
|
@ -13,29 +12,21 @@
|
||||||
, setuptools
|
, setuptools
|
||||||
, setuptools-scm
|
, setuptools-scm
|
||||||
, six
|
, six
|
||||||
, toml
|
, tomli
|
||||||
, wcwidth
|
, wcwidth
|
||||||
, writeText
|
, writeText
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pytest";
|
pname = "pytest";
|
||||||
version = "6.2.5";
|
version = "7.0.1";
|
||||||
disabled = !isPy3k;
|
disabled = !isPy3k;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89";
|
sha256 = "sha256-4wkFoMEx09lLiWJKHMWv7D4LovvbFRhn2ODr1JhQ8XE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = lib.optionals (pythonAtLeast "3.10") [
|
|
||||||
(fetchpatch {
|
|
||||||
# Fix test_errors_in_xfail_skip_expressions for Python 3.10.1, remove after 6.2.5
|
|
||||||
url = "https://github.com/pytest-dev/pytest/commit/913439f5e5691f391e2969b3c8f0a49e50dce43a.patch";
|
|
||||||
sha256 = "0hsl3lww6bx5k99cp8gj0fy9rg02kcfbwiiwjx2y8vbhwd5ns41p";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ setuptools-scm ];
|
nativeBuildInputs = [ setuptools-scm ];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -48,7 +39,7 @@ buildPythonPackage rec {
|
||||||
py
|
py
|
||||||
setuptools
|
setuptools
|
||||||
six
|
six
|
||||||
toml
|
tomli
|
||||||
wcwidth
|
wcwidth
|
||||||
] ++ lib.optionals (pythonOlder "3.6") [ pathlib2 ];
|
] ++ lib.optionals (pythonOlder "3.6") [ pathlib2 ];
|
||||||
|
|
||||||
|
@ -95,7 +86,7 @@ buildPythonPackage rec {
|
||||||
# - files are not needed after tests are finished
|
# - files are not needed after tests are finished
|
||||||
pytestRemoveBytecodePhase () {
|
pytestRemoveBytecodePhase () {
|
||||||
# suffix is defined at:
|
# suffix is defined at:
|
||||||
# https://github.com/pytest-dev/pytest/blob/6.2.5/src/_pytest/assertion/rewrite.py#L51-L53
|
# https://github.com/pytest-dev/pytest/blob/7.0.1/src/_pytest/assertion/rewrite.py#L51-L53
|
||||||
find $out -name "*-pytest-*.py[co]" -delete
|
find $out -name "*-pytest-*.py[co]" -delete
|
||||||
}
|
}
|
||||||
preDistPhases+=" pytestRemoveBytecodePhase"
|
preDistPhases+=" pytestRemoveBytecodePhase"
|
||||||
|
|
Loading…
Reference in a new issue