2023-01-20 10:41:00 +00:00
|
|
|
{ lib
|
2021-09-18 10:52:07 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, isPy27
|
2023-04-29 16:46:19 +00:00
|
|
|
, isPyPy
|
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
|
2023-03-15 16:39:30 +00:00
|
|
|
, hatch-vcs
|
|
|
|
, hatchling
|
2020-05-29 06:06:01 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, importlib-resources
|
2021-09-18 10:52:07 +00:00
|
|
|
, platformdirs
|
2021-02-19 19:06:45 +00:00
|
|
|
, pytest-freezegun
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "virtualenv";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "20.19.0";
|
|
|
|
format = "pyproject";
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-N6ZAuoLtQLImWZxSLUEeS+XtszmgwN4DDA3HtkbWFZA=";
|
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 = [
|
2023-03-15 16:39:30 +00:00
|
|
|
hatch-vcs
|
|
|
|
hatchling
|
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 = [
|
|
|
|
distlib
|
|
|
|
filelock
|
2021-09-18 10:52:07 +00:00
|
|
|
platformdirs
|
2020-05-29 06:06:01 +00:00
|
|
|
] ++ 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
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-19 19:06:45 +00:00
|
|
|
cython
|
|
|
|
flaky
|
|
|
|
pytest-freezegun
|
|
|
|
pytest-mock
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
disabledTestPaths = [
|
2023-01-20 10:41:00 +00:00
|
|
|
# Ignore tests which require network access
|
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 = [
|
2022-08-12 12:06:08 +00:00
|
|
|
# Network access
|
|
|
|
"test_create_no_seed"
|
|
|
|
"test_seed_link_via_app_data"
|
2021-12-06 16:07:01 +00:00
|
|
|
# Permission Error
|
|
|
|
"test_bad_exe_py_info_no_raise"
|
2023-04-29 16:46:19 +00:00
|
|
|
] ++ lib.optionals (isPyPy) [
|
|
|
|
# encoding problems
|
|
|
|
"test_bash"
|
|
|
|
# permission error
|
|
|
|
"test_can_build_c_extensions"
|
|
|
|
# fails to detect pypy version
|
|
|
|
"test_discover_ok"
|
2021-02-19 19:06:45 +00:00
|
|
|
];
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"virtualenv"
|
|
|
|
];
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A tool to create isolated Python environments";
|
|
|
|
homepage = "http://www.virtualenv.org";
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/pypa/virtualenv/releases/tag/${version}";
|
2021-02-19 19:06:45 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ goibhniu ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|