1 |
arfrever 09/08/07 00:43:16 |
2 |
|
3 |
Modified: python.eclass |
4 |
Log: |
5 |
Prints errors occuring during running python_mod_compile()/python_mod_optimize() only once. Improve python_execute_function(). |
6 |
|
7 |
Revision Changes Path |
8 |
1.61 eclass/python.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?rev=1.61&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?rev=1.61&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/python.eclass?r1=1.60&r2=1.61 |
13 |
|
14 |
Index: python.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/python.eclass,v |
17 |
retrieving revision 1.60 |
18 |
retrieving revision 1.61 |
19 |
diff -u -r1.60 -r1.61 |
20 |
--- python.eclass 5 Aug 2009 18:31:30 -0000 1.60 |
21 |
+++ python.eclass 7 Aug 2009 00:43:16 -0000 1.61 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2009 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.60 2009/08/05 18:31:30 arfrever Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.61 2009/08/07 00:43:16 arfrever Exp $ |
27 |
|
28 |
# @ECLASS: python.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -241,9 +241,15 @@ |
31 |
fi |
32 |
|
33 |
if [[ "${EBUILD_PHASE}" == "configure" ]]; then |
34 |
- python_default_function() { |
35 |
- econf |
36 |
- } |
37 |
+ if has "${EAPI}" 2; then |
38 |
+ python_default_function() { |
39 |
+ econf |
40 |
+ } |
41 |
+ else |
42 |
+ python_default_function() { |
43 |
+ nonfatal econf |
44 |
+ } |
45 |
+ fi |
46 |
elif [[ "${EBUILD_PHASE}" == "compile" ]]; then |
47 |
python_default_function() { |
48 |
emake |
49 |
@@ -552,7 +558,7 @@ |
50 |
|
51 |
if ((${#myfiles[@]})); then |
52 |
python${PYVER} ${myroot}/usr/$(get_libdir)/python${PYVER}/py_compile.py "${myfiles[@]}" |
53 |
- python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/py_compile.py "${myfiles[@]}" |
54 |
+ python${PYVER} -O ${myroot}/usr/$(get_libdir)/python${PYVER}/py_compile.py "${myfiles[@]}" 2> /dev/null |
55 |
else |
56 |
ewarn "No files to compile!" |
57 |
fi |
58 |
@@ -640,14 +646,14 @@ |
59 |
site_packages_absolute_dirs+=("${root}/$(python_get_sitedir)/${dir}") |
60 |
done |
61 |
"$(PYTHON)" "${root}/$(python_get_libdir)/compileall.py" "${options[@]}" "${site_packages_absolute_dirs[@]}" || return_code="1" |
62 |
- "$(PYTHON)" -O "${root}/$(python_get_libdir)/compileall.py" "${options[@]}" "${site_packages_absolute_dirs[@]}" || return_code="1" |
63 |
+ "$(PYTHON)" -O "${root}/$(python_get_libdir)/compileall.py" "${options[@]}" "${site_packages_absolute_dirs[@]}" 2> /dev/null || return_code="1" |
64 |
fi |
65 |
if ((${#site_packages_files[@]})); then |
66 |
for file in "${site_packages_files[@]}"; do |
67 |
site_packages_absolute_files+=("${root}/$(python_get_sitedir)/${file}") |
68 |
done |
69 |
"$(PYTHON)" "${root}/$(python_get_libdir)/py_compile.py" "${site_packages_absolute_files[@]}" || return_code="1" |
70 |
- "$(PYTHON)" -O "${root}/$(python_get_libdir)/py_compile.py" "${site_packages_absolute_files[@]}" || return_code="1" |
71 |
+ "$(PYTHON)" -O "${root}/$(python_get_libdir)/py_compile.py" "${site_packages_absolute_files[@]}" 2> /dev/null || return_code="1" |
72 |
fi |
73 |
eend "${return_code}" |
74 |
fi |
75 |
@@ -662,11 +668,11 @@ |
76 |
ebegin "Compilation and optimization of Python modules placed outside of site-packages directories for Python ${PYVER}..." |
77 |
if ((${#other_dirs[@]})); then |
78 |
python${PYVER} "${root}/$(python_get_libdir)/compileall.py" "${options[@]}" "${other_dirs[@]}" || return_code="1" |
79 |
- python${PYVER} -O "${root}/$(python_get_libdir)/compileall.py" "${options[@]}" "${other_dirs[@]}" || return_code="1" |
80 |
+ python${PYVER} -O "${root}/$(python_get_libdir)/compileall.py" "${options[@]}" "${other_dirs[@]}" 2> /dev/null || return_code="1" |
81 |
fi |
82 |
if ((${#other_files[@]})); then |
83 |
python${PYVER} "${root}/$(python_get_libdir)/py_compile.py" "${other_files[@]}" || return_code="1" |
84 |
- python${PYVER} -O "${root}/$(python_get_libdir)/py_compile.py" "${other_files[@]}" || return_code="1" |
85 |
+ python${PYVER} -O "${root}/$(python_get_libdir)/py_compile.py" "${other_files[@]}" 2> /dev/null || return_code="1" |
86 |
fi |
87 |
eend "${return_code}" |
88 |
fi |
89 |
@@ -722,7 +728,7 @@ |
90 |
"${myopts[@]}" "${mydirs[@]}" |
91 |
python${PYVER} -O \ |
92 |
"${myroot}"/usr/$(get_libdir)/python${PYVER}/compileall.py \ |
93 |
- "${myopts[@]}" "${mydirs[@]}" |
94 |
+ "${myopts[@]}" "${mydirs[@]}" 2> /dev/null |
95 |
fi |
96 |
|
97 |
if ((${#myfiles[@]})); then |