1 |
commit: 6215e9cb94043395a448504f874699fc0ba07032 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 8 11:55:16 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 9 20:31:52 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6215e9cb |
7 |
|
8 |
distutils-r1.eclass: Print buildsys package versions to aid debug |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
eclass/distutils-r1.eclass | 92 ++++++++++++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 92 insertions(+) |
14 |
|
15 |
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass |
16 |
index e9a28056e9cc..c2f5ab263cd5 100644 |
17 |
--- a/eclass/distutils-r1.eclass |
18 |
+++ b/eclass/distutils-r1.eclass |
19 |
@@ -851,6 +851,97 @@ _distutils-r1_check_all_phase_mismatch() { |
20 |
fi |
21 |
} |
22 |
|
23 |
+# @FUNCTION: _distutils-r1_print_package_versions |
24 |
+# @INTERNAL |
25 |
+# @DESCRIPTION: |
26 |
+# Print the version of the relevant build system packages to aid |
27 |
+# debugging. |
28 |
+_distutils-r1_print_package_versions() { |
29 |
+ local packages=() |
30 |
+ |
31 |
+ if [[ ${DISTUTILS_USE_PEP517} ]]; then |
32 |
+ packages+=( |
33 |
+ dev-python/gpep517 |
34 |
+ dev-python/installer |
35 |
+ ) |
36 |
+ case ${DISTUTILS_USE_PEP517} in |
37 |
+ flit) |
38 |
+ packages+=( |
39 |
+ dev-python/flit_core |
40 |
+ ) |
41 |
+ ;; |
42 |
+ flit_scm) |
43 |
+ packages+=( |
44 |
+ dev-python/flit_core |
45 |
+ dev-python/flit_scm |
46 |
+ dev-python/setuptools_scm |
47 |
+ ) |
48 |
+ ;; |
49 |
+ hatchling) |
50 |
+ packages+=( |
51 |
+ dev-python/hatchling |
52 |
+ ) |
53 |
+ ;; |
54 |
+ jupyter) |
55 |
+ packages+=( |
56 |
+ dev-python/jupyter_packaging |
57 |
+ dev-python/setuptools |
58 |
+ dev-python/setuptools_scm |
59 |
+ dev-python/wheel |
60 |
+ ) |
61 |
+ ;; |
62 |
+ maturin) |
63 |
+ packages+=( |
64 |
+ dev-util/maturin |
65 |
+ ) |
66 |
+ ;; |
67 |
+ pbr) |
68 |
+ packages+=( |
69 |
+ dev-python/pbr |
70 |
+ dev-python/setuptools |
71 |
+ dev-python/wheel |
72 |
+ ) |
73 |
+ ;; |
74 |
+ pdm) |
75 |
+ packages+=( |
76 |
+ dev-python/pdm-pep517 |
77 |
+ dev-python/setuptools |
78 |
+ ) |
79 |
+ ;; |
80 |
+ poetry) |
81 |
+ packages+=( |
82 |
+ dev-python/poetry-core |
83 |
+ ) |
84 |
+ ;; |
85 |
+ setuptools) |
86 |
+ packages+=( |
87 |
+ dev-python/setuptools |
88 |
+ dev-python/setuptools_scm |
89 |
+ dev-python/wheel |
90 |
+ ) |
91 |
+ ;; |
92 |
+ esac |
93 |
+ else |
94 |
+ case ${DISTUTILS_USE_SETUPTOOLS} in |
95 |
+ manual|no) |
96 |
+ return |
97 |
+ ;; |
98 |
+ *) |
99 |
+ packages+=( |
100 |
+ dev-python/setuptools |
101 |
+ ) |
102 |
+ ;; |
103 |
+ esac |
104 |
+ fi |
105 |
+ |
106 |
+ local pkg |
107 |
+ einfo "Build system packages:" |
108 |
+ for pkg in "${packages[@]}"; do |
109 |
+ local installed=$(best_version "${pkg}") |
110 |
+ einfo " $(printf '%-30s' "${pkg}"): ${installed#${pkg}-}" |
111 |
+ done |
112 |
+} |
113 |
+ |
114 |
# @FUNCTION: distutils-r1_python_prepare_all |
115 |
# @DESCRIPTION: |
116 |
# The default python_prepare_all(). It applies the patches from PATCHES |
117 |
@@ -894,6 +985,7 @@ distutils-r1_python_prepare_all() { |
118 |
python_copy_sources |
119 |
fi |
120 |
|
121 |
+ _distutils-r1_print_package_versions |
122 |
_DISTUTILS_DEFAULT_CALLED=1 |
123 |
} |