2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
isPyPy,
|
|
|
|
cython,
|
|
|
|
distlib,
|
|
|
|
fetchPypi,
|
|
|
|
filelock,
|
|
|
|
flaky,
|
|
|
|
hatch-vcs,
|
|
|
|
hatchling,
|
|
|
|
importlib-metadata,
|
|
|
|
platformdirs,
|
|
|
|
pytest-freezegun,
|
|
|
|
pytest-mock,
|
|
|
|
pytest-timeout,
|
|
|
|
pytestCheckHook,
|
|
|
|
time-machine,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "virtualenv";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "20.26.2";
|
2023-03-15 16:39:30 +00:00
|
|
|
format = "pyproject";
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-gr8PTuu7eNNt2u4Cg9Q/5XNrU4gLiozc03OQoHrDdBw=";
|
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
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
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
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (!isPyPy) [ time-machine ];
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# Network access
|
|
|
|
"test_create_no_seed"
|
|
|
|
"test_seed_link_via_app_data"
|
|
|
|
# Permission Error
|
|
|
|
"test_bad_exe_py_info_no_raise"
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonOlder "3.11") [ "test_help" ]
|
|
|
|
++ 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
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "virtualenv" ];
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool to create isolated Python environments";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "virtualenv";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.virtualenv.org";
|
2023-08-10 07:59:29 +00:00
|
|
|
changelog = "https://github.com/pypa/virtualenv/blob/${version}/docs/changelog.rst";
|
2021-02-19 19:06:45 +00:00
|
|
|
license = licenses.mit;
|
2024-07-27 06:49:29 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|