uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,37 @@
From 21563405d6e2348ee457187f7fb61beb102bb367 Mon Sep 17 00:00:00 2001
From: Frederik Rietdijk <fridh@fridh.nl>
Date: Sun, 24 May 2020 09:33:13 +0200
Subject: [PATCH] Check base_prefix and base_exec_prefix for Python 2
This is a Nixpkgs-specific change so it can support virtualenvs from Nix envs.
---
src/virtualenv/discovery/py_info.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/virtualenv/discovery/py_info.py b/src/virtualenv/discovery/py_info.py
index 6f12128..74e9218 100644
--- a/src/virtualenv/discovery/py_info.py
+++ b/src/virtualenv/discovery/py_info.py
@@ -51,13 +51,17 @@ class PythonInfo(object):
self.version = u(sys.version)
self.os = u(os.name)
+ config_vars = {} if sys.version_info.major is not 2 else sysconfig._CONFIG_VARS
+ base_prefix = config_vars.get("prefix")
+ base_exec_prefix = config_vars.get("exec_prefix")
+
# information about the prefix - determines python home
self.prefix = u(abs_path(getattr(sys, "prefix", None))) # prefix we think
- self.base_prefix = u(abs_path(getattr(sys, "base_prefix", None))) # venv
+ self.base_prefix = u(abs_path(getattr(sys, "base_prefix", base_prefix))) # venv
self.real_prefix = u(abs_path(getattr(sys, "real_prefix", None))) # old virtualenv
# information about the exec prefix - dynamic stdlib modules
- self.base_exec_prefix = u(abs_path(getattr(sys, "base_exec_prefix", None)))
+ self.base_exec_prefix = u(abs_path(getattr(sys, "base_exec_prefix", base_exec_prefix)))
self.exec_prefix = u(abs_path(getattr(sys, "exec_prefix", None)))
self.executable = u(abs_path(sys.executable)) # the executable we were invoked via
--
2.25.1

View file

@ -0,0 +1,90 @@
{ stdenv
, lib
, buildPythonPackage
, pythonOlder
, isPy27
, backports-entry-points-selectable
, cython
, distlib
, fetchPypi
, filelock
, flaky
, importlib-metadata
, importlib-resources
, pathlib2
, platformdirs
, pytest-freezegun
, pytest-mock
, pytest-timeout
, pytestCheckHook
, setuptools-scm
, six
}:
buildPythonPackage rec {
pname = "virtualenv";
version = "20.14.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-jltAIDcocSboHM3pQyuVqL5bGdNlhPZJVwYKNIjBHKg=";
};
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
backports-entry-points-selectable
distlib
filelock
platformdirs
six
] ++ lib.optionals (pythonOlder "3.4" && !stdenv.hostPlatform.isWindows) [
pathlib2
] ++ lib.optionals (pythonOlder "3.7") [
importlib-resources
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
patches = lib.optionals (isPy27) [
./0001-Check-base_prefix-and-base_exec_prefix-for-Python-2.patch
];
checkInputs = [
cython
flaky
pytest-freezegun
pytest-mock
pytest-timeout
pytestCheckHook
];
preCheck = ''
export HOME=$(mktemp -d)
'';
# Ignore tests which require network access
disabledTestPaths = [
"tests/unit/create/test_creator.py"
"tests/unit/seed/embed/test_bootstrap_link_via_app_data.py"
];
disabledTests = [
# Permission Error
"test_bad_exe_py_info_no_raise"
] ++ lib.optionals isPy27 [
"test_python_via_env_var"
"test_python_multi_value_prefer_newline_via_env_var"
];
pythonImportsCheck = [ "virtualenv" ];
meta = with lib; {
description = "A tool to create isolated Python environments";
homepage = "http://www.virtualenv.org";
license = licenses.mit;
maintainers = with maintainers; [ goibhniu ];
};
}