2021-09-18 10:52:07 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, isPy27
|
|
|
|
, backports-entry-points-selectable
|
2021-02-19 19:06:45 +00:00
|
|
|
, cython
|
2020-05-29 06:06:01 +00:00
|
|
|
, distlib
|
2021-02-19 19:06:45 +00:00
|
|
|
, fetchPypi
|
2020-05-29 06:06:01 +00:00
|
|
|
, filelock
|
2021-02-19 19:06:45 +00:00
|
|
|
, flaky
|
2020-05-29 06:06:01 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, importlib-resources
|
|
|
|
, pathlib2
|
2021-09-18 10:52:07 +00:00
|
|
|
, platformdirs
|
2021-02-19 19:06:45 +00:00
|
|
|
, pytest-freezegun
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2020-05-29 06:06:01 +00:00
|
|
|
, six
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "virtualenv";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "20.14.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-jltAIDcocSboHM3pQyuVqL5bGdNlhPZJVwYKNIjBHKg=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
nativeBuildInputs = [
|
2021-06-04 09:07:49 +00:00
|
|
|
setuptools-scm
|
2020-05-29 06:06:01 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
backports-entry-points-selectable
|
2020-05-29 06:06:01 +00:00
|
|
|
distlib
|
|
|
|
filelock
|
2021-09-18 10:52:07 +00:00
|
|
|
platformdirs
|
2020-05-29 06:06:01 +00:00
|
|
|
six
|
2021-09-18 10:52:07 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.4" && !stdenv.hostPlatform.isWindows) [
|
2020-05-29 06:06:01 +00:00
|
|
|
pathlib2
|
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
importlib-resources
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
patches = lib.optionals (isPy27) [
|
|
|
|
./0001-Check-base_prefix-and-base_exec_prefix-for-Python-2.patch
|
|
|
|
];
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
checkInputs = [
|
|
|
|
cython
|
|
|
|
flaky
|
|
|
|
pytest-freezegun
|
|
|
|
pytest-mock
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Ignore tests which require network access
|
2021-03-09 03:18:52 +00:00
|
|
|
disabledTestPaths = [
|
2021-02-19 19:06:45 +00:00
|
|
|
"tests/unit/create/test_creator.py"
|
|
|
|
"tests/unit/seed/embed/test_bootstrap_link_via_app_data.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2021-12-06 16:07:01 +00:00
|
|
|
# Permission Error
|
|
|
|
"test_bad_exe_py_info_no_raise"
|
2021-12-19 01:06:50 +00:00
|
|
|
] ++ lib.optionals isPy27 [
|
|
|
|
"test_python_via_env_var"
|
|
|
|
"test_python_multi_value_prefer_newline_via_env_var"
|
2021-02-19 19:06:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "virtualenv" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A tool to create isolated Python environments";
|
|
|
|
homepage = "http://www.virtualenv.org";
|
2021-02-19 19:06:45 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ goibhniu ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|