2022-10-19 19:50:22 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2021-08-26 21:32:47 +02:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, isPy27
|
2021-01-19 10:40:47 +01:00
|
|
|
, cython
|
2020-05-22 16:19:47 +02:00
|
|
|
, distlib
|
2021-01-19 10:40:47 +01:00
|
|
|
, fetchPypi
|
2020-05-22 16:19:47 +02:00
|
|
|
, filelock
|
2021-01-19 10:40:47 +01:00
|
|
|
, flaky
|
2020-05-22 16:19:47 +02:00
|
|
|
, importlib-metadata
|
|
|
|
, importlib-resources
|
|
|
|
, pathlib2
|
2021-08-26 21:32:47 +02:00
|
|
|
, platformdirs
|
2021-01-19 10:40:47 +01:00
|
|
|
, pytest-freezegun
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
2021-06-03 12:09:11 +02:00
|
|
|
, setuptools-scm
|
2017-07-07 17:57:30 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "virtualenv";
|
2022-12-29 11:28:52 -08:00
|
|
|
version = "20.17.1";
|
|
|
|
format = "setuptools";
|
2017-07-07 17:57:30 +02:00
|
|
|
|
2022-10-19 19:50:22 +02:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2017-07-07 17:57:30 +02:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-12-29 11:28:52 -08:00
|
|
|
hash = "sha256-+LknaE78bxzCBsnbKXpXCrmtDlHBb6nkVIfTbRkFwFg=";
|
2017-07-07 17:57:30 +02:00
|
|
|
};
|
|
|
|
|
2020-05-22 16:19:47 +02:00
|
|
|
nativeBuildInputs = [
|
2021-06-03 12:09:11 +02:00
|
|
|
setuptools-scm
|
2020-05-22 16:19:47 +02:00
|
|
|
];
|
2017-07-07 17:57:30 +02:00
|
|
|
|
2020-05-22 16:19:47 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
distlib
|
|
|
|
filelock
|
2021-08-26 21:32:47 +02:00
|
|
|
platformdirs
|
2020-05-22 16:19:47 +02:00
|
|
|
] ++ lib.optionals (pythonOlder "3.7") [
|
|
|
|
importlib-resources
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
2017-07-07 17:57:30 +02:00
|
|
|
|
2020-05-24 09:35:45 +02:00
|
|
|
patches = lib.optionals (isPy27) [
|
|
|
|
./0001-Check-base_prefix-and-base_exec_prefix-for-Python-2.patch
|
|
|
|
];
|
|
|
|
|
2021-01-19 10:40:47 +01:00
|
|
|
checkInputs = [
|
|
|
|
cython
|
|
|
|
flaky
|
|
|
|
pytest-freezegun
|
|
|
|
pytest-mock
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2021-02-14 23:54:55 +01:00
|
|
|
disabledTestPaths = [
|
2022-10-19 19:50:22 +02:00
|
|
|
# Ignore tests which require network access
|
2021-01-19 10:40:47 +01:00
|
|
|
"tests/unit/create/test_creator.py"
|
|
|
|
"tests/unit/seed/embed/test_bootstrap_link_via_app_data.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2022-07-16 12:59:43 +02:00
|
|
|
# Network access
|
|
|
|
"test_create_no_seed"
|
|
|
|
"test_seed_link_via_app_data"
|
2021-10-09 17:20:35 +02:00
|
|
|
# Permission Error
|
|
|
|
"test_bad_exe_py_info_no_raise"
|
2021-01-19 10:40:47 +01:00
|
|
|
];
|
|
|
|
|
2022-10-19 19:50:22 +02:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"virtualenv"
|
|
|
|
];
|
2021-01-19 10:40:47 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
2017-07-07 17:57:30 +02:00
|
|
|
description = "A tool to create isolated Python environments";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "http://www.virtualenv.org";
|
2022-10-19 19:50:22 +02:00
|
|
|
changelog = "https://github.com/pypa/virtualenv/releases/tag/${version}";
|
2021-01-19 10:40:47 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ goibhniu ];
|
2017-07-07 17:57:30 +02:00
|
|
|
};
|
2020-03-31 21:11:51 -04:00
|
|
|
}
|