1 |
djc 10/10/08 17:17:44 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: python-2.6.6.ebuild |
5 |
Log: |
6 |
Version bump python to 2.6.6 (bug 334425). |
7 |
|
8 |
(Portage version: 2.1.9.13/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.496 dev-lang/python/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.496&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.496&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?r1=1.495&r2=1.496 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v |
20 |
retrieving revision 1.495 |
21 |
retrieving revision 1.496 |
22 |
diff -u -r1.495 -r1.496 |
23 |
--- ChangeLog 15 Aug 2010 23:14:30 -0000 1.495 |
24 |
+++ ChangeLog 8 Oct 2010 17:17:43 -0000 1.496 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for dev-lang/python |
27 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.495 2010/08/15 23:14:30 jer Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.496 2010/10/08 17:17:43 djc Exp $ |
30 |
+ |
31 |
+*python-2.6.6 (08 Oct 2010) |
32 |
+ |
33 |
+ 08 Oct 2010; Dirkjan Ochtman <djc@g.o> +python-2.6.6.ebuild: |
34 |
+ Version bump to 2.6.6 (bug 334425). |
35 |
|
36 |
15 Aug 2010; Jeroen Roovers <jer@g.o> python-3.1.2-r4.ebuild: |
37 |
Stable for HPPA (bug #325593). |
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-lang/python/python-2.6.6.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.6.6.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.6.6.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: python-2.6.6.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2010 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.6.6.ebuild,v 1.1 2010/10/08 17:17:43 djc Exp $ |
51 |
|
52 |
EAPI="2" |
53 |
|
54 |
inherit autotools eutils flag-o-matic multilib pax-utils python toolchain-funcs |
55 |
|
56 |
MY_P="Python-${PV}" |
57 |
|
58 |
PATCHSET_REVISION="0" |
59 |
|
60 |
DESCRIPTION="Python is an interpreted, interactive, object-oriented programming language." |
61 |
HOMEPAGE="http://www.python.org/" |
62 |
SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.bz2 |
63 |
mirror://gentoo/python-gentoo-patches-${PV}$([[ "${PATCHSET_REVISION}" != "0" ]] && echo "-r${PATCHSET_REVISION}").tar.bz2" |
64 |
|
65 |
LICENSE="PSF-2.2" |
66 |
SLOT="2.6" |
67 |
PYTHON_ABI="${SLOT}" |
68 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" |
69 |
IUSE="-berkdb build doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" |
70 |
|
71 |
RDEPEND=">=app-admin/eselect-python-20091230 |
72 |
>=sys-libs/zlib-1.1.3 |
73 |
virtual/libffi |
74 |
virtual/libintl |
75 |
!build? ( |
76 |
berkdb? ( || ( |
77 |
sys-libs/db:4.7 |
78 |
sys-libs/db:4.6 |
79 |
sys-libs/db:4.5 |
80 |
sys-libs/db:4.4 |
81 |
sys-libs/db:4.3 |
82 |
sys-libs/db:4.2 |
83 |
) ) |
84 |
gdbm? ( sys-libs/gdbm ) |
85 |
ncurses? ( |
86 |
>=sys-libs/ncurses-5.2 |
87 |
readline? ( >=sys-libs/readline-4.1 ) |
88 |
) |
89 |
sqlite? ( >=dev-db/sqlite-3 ) |
90 |
ssl? ( dev-libs/openssl ) |
91 |
tk? ( >=dev-lang/tk-8.0 ) |
92 |
xml? ( >=dev-libs/expat-2 ) |
93 |
) |
94 |
doc? ( dev-python/python-docs:${SLOT} )" |
95 |
DEPEND="${RDEPEND} |
96 |
dev-util/pkgconfig |
97 |
!sys-devel/gcc[libffi]" |
98 |
RDEPEND+=" !build? ( app-misc/mime-types )" |
99 |
PDEPEND="app-admin/python-updater" |
100 |
|
101 |
PROVIDE="virtual/python" |
102 |
|
103 |
S="${WORKDIR}/${MY_P}" |
104 |
|
105 |
pkg_setup() { |
106 |
python_pkg_setup |
107 |
|
108 |
if use berkdb; then |
109 |
ewarn "\"bsddb\" module is out-of-date and no longer maintained inside dev-lang/python. It has" |
110 |
ewarn "been additionally removed in Python 3. You should use external, still maintained \"bsddb3\"" |
111 |
ewarn "module provided by dev-python/bsddb3 which supports both Python 2 and Python 3." |
112 |
fi |
113 |
} |
114 |
|
115 |
src_prepare() { |
116 |
# Ensure that internal copies of expat, libffi and zlib are not used. |
117 |
rm -fr Modules/expat |
118 |
rm -fr Modules/_ctypes/libffi* |
119 |
rm -fr Modules/zlib |
120 |
|
121 |
if ! tc-is-cross-compiler; then |
122 |
rm "${WORKDIR}/${PV}"/*_all_crosscompile.patch |
123 |
fi |
124 |
|
125 |
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}" |
126 |
|
127 |
# Avoid regeneration, which would not change contents of files. |
128 |
touch Include/Python-ast.h Python/Python-ast.c |
129 |
|
130 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
131 |
Lib/distutils/command/install.py \ |
132 |
Lib/distutils/sysconfig.py \ |
133 |
Lib/site.py \ |
134 |
Makefile.pre.in \ |
135 |
Modules/Setup.dist \ |
136 |
Modules/getpath.c \ |
137 |
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
138 |
|
139 |
# Fix os.utime() on hppa. utimes it not supported but unfortunately reported as working - gmsoft (22 May 04) |
140 |
# PLEASE LEAVE THIS FIX FOR NEXT VERSIONS AS IT'S A CRITICAL FIX !!! |
141 |
[[ "${ARCH}" == "hppa" ]] && sed -e "s/utimes //" -i "${S}/configure" |
142 |
|
143 |
if ! use wininst; then |
144 |
# Remove Microsoft Windows executables. |
145 |
rm Lib/distutils/command/wininst-*.exe |
146 |
fi |
147 |
|
148 |
# Fix OtherFileTests.testStdin() not to assume |
149 |
# that stdin is a tty for bug #248081. |
150 |
sed -e "s:'osf1V5':'osf1V5' and sys.stdin.isatty():" -i Lib/test/test_file.py || die "sed failed" |
151 |
|
152 |
eautoreconf |
153 |
} |
154 |
|
155 |
src_configure() { |
156 |
# Disable extraneous modules with extra dependencies. |
157 |
if use build; then |
158 |
export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" |
159 |
export PYTHON_DISABLE_SSL="1" |
160 |
else |
161 |
# dbm module can be linked against berkdb or gdbm. |
162 |
# Defaults to gdbm when both are enabled, #204343. |
163 |
local disable |
164 |
use berkdb || use gdbm || disable+=" dbm" |
165 |
use berkdb || disable+=" _bsddb" |
166 |
use gdbm || disable+=" gdbm" |
167 |
use ncurses || disable+=" _curses _curses_panel" |
168 |
use readline || disable+=" readline" |
169 |
use sqlite || disable+=" _sqlite3" |
170 |
use ssl || export PYTHON_DISABLE_SSL="1" |
171 |
use tk || disable+=" _tkinter" |
172 |
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
173 |
export PYTHON_DISABLE_MODULES="${disable}" |
174 |
|
175 |
if ! use xml; then |
176 |
ewarn "You have configured Python without XML support." |
177 |
ewarn "This is NOT a recommended configuration as you" |
178 |
ewarn "may face problems parsing any XML documents." |
179 |
fi |
180 |
fi |
181 |
|
182 |
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
183 |
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
184 |
fi |
185 |
|
186 |
if [[ "$(gcc-major-version)" -ge 4 ]]; then |
187 |
append-flags -fwrapv |
188 |
fi |
189 |
|
190 |
filter-flags -malign-double |
191 |
|
192 |
[[ "${ARCH}" == "alpha" ]] && append-flags -fPIC |
193 |
|
194 |
# https://bugs.gentoo.org/show_bug.cgi?id=50309 |
195 |
if is-flagq -O3; then |
196 |
is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
197 |
use hardened && replace-flags -O3 -O2 |
198 |
fi |
199 |
|
200 |
if tc-is-cross-compiler; then |
201 |
OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \ |
202 |
./configure --{build,host}=${CBUILD} || die "cross-configure failed" |
203 |
emake python Parser/pgen || die "cross-make failed" |
204 |
mv python hostpython |
205 |
mv Parser/pgen Parser/hostpgen |
206 |
make distclean |
207 |
sed -i \ |
208 |
-e "/^HOSTPYTHON/s:=.*:=./hostpython:" \ |
209 |
-e "/^HOSTPGEN/s:=.*:=./Parser/hostpgen:" \ |
210 |
Makefile.pre.in || die "sed failed" |
211 |
fi |
212 |
|
213 |
# Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. |
214 |
tc-export CXX |
215 |
|
216 |
# Set LDFLAGS so we link modules with -lpython2.6 correctly. |
217 |
# Needed on FreeBSD unless Python 2.6 is already installed. |
218 |
# Please query BSD team before removing this! |
219 |
append-ldflags "-L." |
220 |
|
221 |
OPT="" econf \ |
222 |
--with-fpectl \ |
223 |
--enable-shared \ |
224 |
$(use_enable ipv6) \ |
225 |
$(use_with threads) \ |
226 |
$(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ |
227 |
--infodir='${prefix}/share/info' \ |
228 |
--mandir='${prefix}/share/man' \ |
229 |
--with-libc="" \ |
230 |
--with-system-ffi |
231 |
} |
232 |
|
233 |
src_test() { |
234 |
# Tests will not work when cross compiling. |
235 |
if tc-is-cross-compiler; then |
236 |
elog "Disabling tests due to crosscompiling." |
237 |
return |
238 |
fi |
239 |
|
240 |
# Byte compiling should be enabled here. |
241 |
# Otherwise test_import fails. |
242 |
python_enable_pyc |
243 |
|
244 |
# Skip failing tests. |
245 |
local skip_tests="distutils httpservers minidom pyexpat sax tcl" |
246 |
|
247 |
# test_ctypes fails with PAX kernel (bug #234498). |
248 |
host-is-pax && skip_tests+=" ctypes" |
249 |
|
250 |
for test in ${skip_tests}; do |
251 |
mv "${S}/Lib/test/test_${test}.py" "${T}" |
252 |
done |
253 |
|
254 |
# Rerun failed tests in verbose mode (regrtest -w). |
255 |
EXTRATESTOPTS="-w" emake test |
256 |
local result="$?" |
257 |
|
258 |
for test in ${skip_tests}; do |
259 |
mv "${T}/test_${test}.py" "${S}/Lib/test/test_${test}.py" |
260 |
done |
261 |
|
262 |
elog "The following tests have been skipped:" |
263 |
for test in ${skip_tests}; do |
264 |
elog "test_${test}.py" |
265 |
done |
266 |
|
267 |
elog "If you would like to run them, you may:" |
268 |
elog "cd '${EPREFIX}$(python_get_libdir)/test'" |
269 |
elog "and run the tests separately." |
270 |
|
271 |
python_disable_pyc |
272 |
|
273 |
if [[ "${result}" -ne 0 ]]; then |
274 |
die "emake test failed" |
275 |
fi |
276 |
} |
277 |
|
278 |
src_install() { |
279 |
[[ -z "${ED}" ]] && ED="${D%/}${EPREFIX}/" |
280 |
|
281 |
emake DESTDIR="${D}" altinstall maninstall || die "emake altinstall maninstall failed" |
282 |
python_clean_installation_image -q |
283 |
|
284 |
mv "${ED}usr/bin/python${SLOT}-config" "${ED}usr/bin/python-config-${SLOT}" |
285 |
|
286 |
# Fix collisions between different slots of Python. |
287 |
mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" |
288 |
mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" |
289 |
mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" |
290 |
mv "${ED}usr/share/man/man1/python.1" "${ED}usr/share/man/man1/python${SLOT}.1" |
291 |
rm -f "${ED}usr/bin/smtpd.py" |
292 |
|
293 |
if use build; then |
294 |
rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{bsddb,idlelib,lib-tk,sqlite3,test} |
295 |
else |
296 |
use elibc_uclibc && rm -fr "${ED}$(python_get_libdir)/"{bsddb/test,test} |
297 |
use berkdb || rm -fr "${ED}$(python_get_libdir)/"{bsddb,test/test_bsddb*} |
298 |
use sqlite || rm -fr "${ED}$(python_get_libdir)/"{sqlite3,test/test_sqlite*} |
299 |
use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${ED}$(python_get_libdir)/"{idlelib,lib-tk} |
300 |
fi |
301 |
|
302 |
use threads || rm -fr "${ED}$(python_get_libdir)/multiprocessing" |
303 |
|
304 |
prep_ml_includes $(python_get_includedir) |
305 |
|
306 |
dodoc Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed" |
307 |
|
308 |
if use examples; then |
309 |
insinto /usr/share/doc/${PF}/examples |
310 |
doins -r "${S}/Tools" || die "doins failed" |
311 |
fi |
312 |
|
313 |
newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed" |
314 |
newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed" |
315 |
|
316 |
# Do not install empty directory. |
317 |
rmdir "${ED}$(python_get_libdir)/lib-old" |
318 |
} |
319 |
|
320 |
pkg_preinst() { |
321 |
if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.6" && ! has_version "${CATEGORY}/${PN}:2.7"; then |
322 |
python_updater_warning="1" |
323 |
fi |
324 |
} |
325 |
|
326 |
eselect_python_update() { |
327 |
local eselect_python_options |
328 |
[[ "$(eselect python show)" == "python2."* ]] && eselect_python_options="--python2" |
329 |
|
330 |
# Create python2 symlink. |
331 |
eselect python update --python2 > /dev/null |
332 |
|
333 |
eselect python update ${eselect_python_options} |
334 |
} |
335 |
|
336 |
pkg_postinst() { |
337 |
eselect_python_update |
338 |
|
339 |
python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir) |
340 |
|
341 |
if [[ "${python_updater_warning}" == "1" ]]; then |
342 |
ewarn |
343 |
ewarn "\e[1;31m************************************************************************\e[0m" |
344 |
ewarn |
345 |
ewarn "You have just upgraded from an older version of Python." |
346 |
ewarn "You should run 'python-updater \${options}' to rebuild Python modules." |
347 |
ewarn |
348 |
ewarn "\e[1;31m************************************************************************\e[0m" |
349 |
ewarn |
350 |
ebeep 12 |
351 |
fi |
352 |
} |
353 |
|
354 |
pkg_postrm() { |
355 |
eselect_python_update |
356 |
|
357 |
python_mod_cleanup $(python_get_libdir) |
358 |
} |