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
|
2021-09-18 10:52:07 +00:00
|
|
|
, platformdirs
|
2021-02-19 19:06:45 +00:00
|
|
|
, pytest-freezegun
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
2023-08-10 07:59:29 +00:00
|
|
|
, time-machine
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "virtualenv";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "20.25.1";
|
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-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-4I4T7NynoL1TeY81bVgxQ0r6Wwe5Pwq98Hl7egb/4Zc=";
|
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.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
|
2023-08-10 07:59:29 +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"
|
|
|
|
];
|
|
|
|
|
|
|
|
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"
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
"test_help"
|
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";
|
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;
|
|
|
|
maintainers = with maintainers; [ goibhniu ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|