Merge pull request #151191 from FRidh/python2-tests
python2.tests: fix the tests
This commit is contained in:
commit
e1f9e754a4
5 changed files with 62 additions and 2 deletions
|
@ -20,7 +20,15 @@ let
|
|||
envs = let
|
||||
inherit python;
|
||||
pythonEnv = python.withPackages(ps: with ps; [ ]);
|
||||
pythonVirtualEnv = python.withPackages(ps: with ps; [ virtualenv ]);
|
||||
pythonVirtualEnv = if python.isPy3k
|
||||
then
|
||||
python.withPackages(ps: with ps; [ virtualenv ])
|
||||
else
|
||||
python.buildEnv.override {
|
||||
extraLibs = with python.pkgs; [ virtualenv ];
|
||||
# Collisions because of namespaces __init__.py
|
||||
ignoreCollisions = true;
|
||||
};
|
||||
in {
|
||||
# Plain Python interpreter
|
||||
plain = rec {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, buildPythonPackage, fetchPypi }:
|
||||
{ lib, buildPythonPackage, fetchPypi, setuptools-scm }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "filelock";
|
||||
|
@ -9,6 +9,10 @@ buildPythonPackage rec {
|
|||
sha256 = "1qry67zv2pmz8px6wdfbjqv75nmryy2ac7asqgs6q6db2722kpcw";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/benediktschmitt/py-filelock";
|
||||
description = "A platform independent file lock for Python";
|
||||
|
|
43
pkgs/development/python-modules/platformdirs/2.nix
Normal file
43
pkgs/development/python-modules/platformdirs/2.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ lib
|
||||
, appdirs
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, platformdirs
|
||||
, pytest-mock
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, setuptools-scm
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "platformdirs";
|
||||
version = "2.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-yCvfOPuX9hbQO9gbFHfeu+dGH+Vb9FM7wng1XU2D8hE=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
appdirs
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "platformdirs" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python module for determining appropriate platform-specific directories";
|
||||
homepage = "https://platformdirs.readthedocs.io/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
|
@ -74,6 +74,9 @@ buildPythonPackage rec {
|
|||
disabledTests = [
|
||||
# Permission Error
|
||||
"test_bad_exe_py_info_no_raise"
|
||||
] ++ lib.optionals isPy27 [
|
||||
"test_python_via_env_var"
|
||||
"test_python_multi_value_prefer_newline_via_env_var"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "virtualenv" ];
|
||||
|
|
|
@ -396,6 +396,8 @@ with self; with super; {
|
|||
|
||||
pip = callPackage ../development/python-modules/pip/20.nix { };
|
||||
|
||||
platformdirs = callPackage ../development/python-modules/platformdirs/2.nix { };
|
||||
|
||||
pluggy = callPackage ../development/python-modules/pluggy/0.nix { };
|
||||
|
||||
postorius = disabled super.postorius;
|
||||
|
|
Loading…
Reference in a new issue