2020-04-24 23:36:52 +00:00
|
|
|
{ buildPythonPackage
|
2020-05-29 06:06:01 +00:00
|
|
|
, appdirs
|
|
|
|
, contextlib2
|
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
|
|
|
, fish
|
|
|
|
, flaky
|
2020-05-29 06:06:01 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, importlib-resources
|
2021-02-19 19:06:45 +00:00
|
|
|
, isPy27
|
|
|
|
, lib
|
2020-05-29 06:06:01 +00:00
|
|
|
, pathlib2
|
2021-02-19 19:06:45 +00:00
|
|
|
, pytest-freezegun
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-05-29 06:06:01 +00:00
|
|
|
, setuptools_scm
|
|
|
|
, six
|
2021-02-19 19:06:45 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "virtualenv";
|
2020-12-07 07:45:13 +00:00
|
|
|
version = "20.2.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-07 07:45:13 +00:00
|
|
|
sha256 = "e0aac7525e880a429764cefd3aaaff54afb5d9f25c82627563603f5d7de5a6e5";
|
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 = [
|
|
|
|
setuptools_scm
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
appdirs
|
|
|
|
distlib
|
|
|
|
filelock
|
|
|
|
six
|
|
|
|
] ++ lib.optionals isPy27 [
|
|
|
|
contextlib2
|
|
|
|
] ++ lib.optionals (isPy27 && !stdenv.hostPlatform.isWindows) [
|
|
|
|
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
|
|
|
|
fish
|
|
|
|
flaky
|
|
|
|
pytest-freezegun
|
|
|
|
pytest-mock
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Ignore tests which require network access
|
|
|
|
disabledTestFiles = [
|
|
|
|
"tests/unit/create/test_creator.py"
|
|
|
|
"tests/unit/seed/embed/test_bootstrap_link_via_app_data.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_can_build_c_extensions"
|
|
|
|
"test_xonsh" # imports xonsh, which is not in pythonPackages
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|