1 |
commit: ae79fb630f0ddb63bfee0ba3ddd11e9de3d60637 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 20 17:22:38 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 24 10:20:53 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae79fb63 |
7 |
|
8 |
distutils-r1.eclass: Permit DISTUTILS_USE_SETUPTOOLS=manual |
9 |
|
10 |
Add a new DISTUTILS_USE_SETUPTOOLS option to permit manually setting |
11 |
the dependencies correctly and suppressing the check. |
12 |
|
13 |
Requested by Arfrever. |
14 |
|
15 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
16 |
|
17 |
eclass/distutils-r1.eclass | 7 +++++-- |
18 |
1 file changed, 5 insertions(+), 2 deletions(-) |
19 |
|
20 |
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass |
21 |
index fae25ea8a5e..65294a065da 100644 |
22 |
--- a/eclass/distutils-r1.eclass |
23 |
+++ b/eclass/distutils-r1.eclass |
24 |
@@ -1,4 +1,4 @@ |
25 |
-# Copyright 1999-2018 Gentoo Foundation |
26 |
+# Copyright 1999-2019 Gentoo Authors |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
|
29 |
# @ECLASS: distutils-r1.eclass |
30 |
@@ -86,6 +86,8 @@ esac |
31 |
# - no -- do not add the dependency (pure distutils package) |
32 |
# - bdepend -- add it to BDEPEND (the default) |
33 |
# - rdepend -- add it to BDEPEND+RDEPEND (when using entry_points) |
34 |
+# - manual -- do not add the depedency and suppress the checks |
35 |
+# (assumes you will take care of doing it correctly) |
36 |
# |
37 |
# This variable is effective only if DISTUTILS_OPTIONAL is disabled. |
38 |
# It needs to be set before the inherit line. |
39 |
@@ -116,7 +118,7 @@ _distutils_set_globals() { |
40 |
local bdep=${rdep} |
41 |
|
42 |
case ${DISTUTILS_USE_SETUPTOOLS} in |
43 |
- no) |
44 |
+ no|manual) |
45 |
;; |
46 |
bdepend) |
47 |
bdep+=" dev-python/setuptools[${PYTHON_USEDEP}]" |
48 |
@@ -436,6 +438,7 @@ distutils_enable_tests() { |
49 |
# incorrectly. |
50 |
_distutils_verify_use_setuptools() { |
51 |
[[ ${DISTUTILS_OPTIONAL} ]] && return |
52 |
+ [[ ${DISTUTILS_USE_SETUPTOOLS} == manual ]] && return |
53 |
|
54 |
# ok, those are cheap greps. we can try toimprove them if we hit |
55 |
# false positives. |