1 |
neurogeek 09/01/22 01:13:20 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: python-2.5.4-r1.ebuild |
5 |
Removed: python-2.5.4.ebuild |
6 |
Log: |
7 |
Rev bump. Patch bundle updated to fix turkish locale patch. Updated older patches too and removed previous version. |
8 |
(Portage version: 2.2_rc16/cvs/Linux 2.6.18-gentoo-r3 i686) |
9 |
|
10 |
Revision Changes Path |
11 |
1.361 dev-lang/python/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/python/ChangeLog?rev=1.361&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/python/ChangeLog?rev=1.361&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/python/ChangeLog?r1=1.360&r2=1.361 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v |
20 |
retrieving revision 1.360 |
21 |
retrieving revision 1.361 |
22 |
diff -u -r1.360 -r1.361 |
23 |
--- ChangeLog 21 Jan 2009 14:12:32 -0000 1.360 |
24 |
+++ ChangeLog 22 Jan 2009 01:13:20 -0000 1.361 |
25 |
@@ -1,6 +1,14 @@ |
26 |
# ChangeLog for dev-lang/python |
27 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.360 2009/01/21 14:12:32 neurogeek Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.361 2009/01/22 01:13:20 neurogeek Exp $ |
30 |
+ |
31 |
+*python-2.5.4-r1 (22 Jan 2009) |
32 |
+ |
33 |
+ 22 Jan 2009; Jesus Rivero <neurogeek@g.o> |
34 |
+ files/python-2.5.2_turkish.patch, files/python-2.6_turkish.patch, |
35 |
+ -python-2.5.4.ebuild, +python-2.5.4-r1.ebuild: |
36 |
+ Rev bump. Patch bundle updated to fix turkish locale patch. Updated older |
37 |
+ patches too and removed previous version. |
38 |
|
39 |
*python-2.5.4 (21 Jan 2009) |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
1.1 dev-lang/python/python-2.5.4-r1.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/python/python-2.5.4-r1.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/python/python-2.5.4-r1.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: python-2.5.4-r1.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2009 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.5.4-r1.ebuild,v 1.1 2009/01/22 01:13:20 neurogeek Exp $ |
54 |
|
55 |
# NOTE about python-portage interactions : |
56 |
# - Do not add a pkg_setup() check for a certain version of portage |
57 |
# in dev-lang/python. It _WILL_ stop people installing from |
58 |
# Gentoo 1.4 images. |
59 |
|
60 |
EAPI=1 |
61 |
|
62 |
inherit eutils autotools flag-o-matic python multilib versionator toolchain-funcs alternatives libtool |
63 |
|
64 |
# we need this so that we don't depends on python.eclass |
65 |
PYVER_MAJOR=$(get_major_version) |
66 |
PYVER_MINOR=$(get_version_component_range 2) |
67 |
PYVER="${PYVER_MAJOR}.${PYVER_MINOR}" |
68 |
|
69 |
MY_P="Python-${PV}" |
70 |
S="${WORKDIR}/${MY_P}" |
71 |
|
72 |
DESCRIPTION="Python is an interpreted, interactive, object-oriented programming |
73 |
language." |
74 |
HOMEPAGE="http://www.python.org/" |
75 |
SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.bz2 |
76 |
mirror://gentoo/python-gentoo-patches-${PV}.tar.bz2" |
77 |
|
78 |
LICENSE="PSF-2.2" |
79 |
SLOT="2.5" |
80 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh |
81 |
~sparc ~sparc-fbsd ~x86 ~x86-fbsd" |
82 |
IUSE="+xml ncurses gdbm ssl readline tk berkdb ipv6 build ucs2 sqlite doc |
83 |
+threads examples elibc_uclibc wininst" |
84 |
|
85 |
# NOTE: dev-python/{elementtree,celementtree,pysqlite,ctypes,cjkcodecs} |
86 |
# do not conflict with the ones in python proper. - liquidx |
87 |
|
88 |
DEPEND=">=sys-libs/zlib-1.1.3 |
89 |
!build? ( |
90 |
sqlite? ( >=dev-db/sqlite-3 ) |
91 |
tk? ( >=dev-lang/tk-8.0 ) |
92 |
ncurses? ( >=sys-libs/ncurses-5.2 |
93 |
readline? ( >=sys-libs/readline-4.1 ) ) |
94 |
berkdb? ( || ( sys-libs/db:4.5 sys-libs/db:4.4 sys-libs/db:4.3 |
95 |
sys-libs/db:4.2 ) ) |
96 |
gdbm? ( sys-libs/gdbm ) |
97 |
ssl? ( dev-libs/openssl ) |
98 |
doc? ( dev-python/python-docs:2.5 ) |
99 |
xml? ( dev-libs/expat ) |
100 |
)" |
101 |
|
102 |
# NOTE: changed RDEPEND to PDEPEND to resolve bug 88777. - kloeri |
103 |
# NOTE: added blocker to enforce correct merge order for bug 88777. - zmedico |
104 |
|
105 |
PDEPEND="${DEPEND} app-admin/python-updater" |
106 |
PROVIDE="virtual/python" |
107 |
|
108 |
src_unpack() { |
109 |
unpack ${A} |
110 |
cd "${S}" |
111 |
|
112 |
if tc-is-cross-compiler ; then |
113 |
[[ $(python -V 2>&1) != "Python ${PV}" ]] && \ |
114 |
die "Crosscompiling requires the same host and build versions." |
115 |
epatch "${FILESDIR}"/python-2.4.4-test-cross.patch |
116 |
else |
117 |
rm "${WORKDIR}/${PV}"/*_all_crosscompile.patch |
118 |
fi |
119 |
|
120 |
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PV}" |
121 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
122 |
Lib/distutils/command/install.py \ |
123 |
Lib/distutils/sysconfig.py \ |
124 |
Lib/site.py \ |
125 |
Makefile.pre.in \ |
126 |
Modules/Setup.dist \ |
127 |
Modules/getpath.c \ |
128 |
setup.py || die |
129 |
|
130 |
# fix os.utime() on hppa. utimes it not supported but unfortunately reported |
131 |
# as working - gmsoft (22 May 04) |
132 |
# PLEASE LEAVE THIS FIX FOR NEXT VERSIONS AS IT'S A CRITICAL FIX !!! |
133 |
[ "${ARCH}" = "hppa" ] && sed -e 's/utimes //' -i "${S}"/configure |
134 |
|
135 |
if ! use wininst; then |
136 |
# remove microsoft windows executables |
137 |
rm Lib/distutils/command/wininst-*.exe |
138 |
fi |
139 |
|
140 |
eautoreconf |
141 |
} |
142 |
|
143 |
src_configure() { |
144 |
# disable extraneous modules with extra dependencies |
145 |
if use build; then |
146 |
export PYTHON_DISABLE_MODULES="readline pyexpat dbm gdbm bsddb _curses |
147 |
_curses_panel _tkinter _sqlite3" |
148 |
export PYTHON_DISABLE_SSL=1 |
149 |
else |
150 |
# dbm module can link to berkdb or gdbm |
151 |
# defaults to gdbm when both are enabled, #204343 |
152 |
local disable |
153 |
use berkdb || use gdbm || disable="${disable} dbm" |
154 |
use berkdb || disable="${disable} bsddb" |
155 |
use xml || disable="${disable} pyexpat" |
156 |
use gdbm || disable="${disable} gdbm" |
157 |
use ncurses || disable="${disable} _curses _curses_panel" |
158 |
use readline || disable="${disable} readline" |
159 |
use sqlite || disable="${disable} _sqlite3" |
160 |
use ssl || export PYTHON_DISABLE_SSL=1 |
161 |
use tk || disable="${disable} _tkinter" |
162 |
export PYTHON_DISABLE_MODULES="${disable}" |
163 |
fi |
164 |
|
165 |
if use !xml; then |
166 |
${PYTHON_DISABLE_MODULES}="${PYTHON_DISABLE_MODULES} pyexpat" |
167 |
ewarn "You have configured Python without XML support." |
168 |
ewarn "This is NOT a recommended configuration as you" |
169 |
ewarn "may face problems parsing any XML documents." |
170 |
fi |
171 |
|
172 |
einfo "Disabled modules: $PYTHON_DISABLE_MODULES" |
173 |
} |
174 |
|
175 |
src_compile() { |
176 |
filter-flags -malign-double |
177 |
|
178 |
# Seems to no longer be necessary |
179 |
#[ "${ARCH}" = "amd64" ] && append-flags -fPIC |
180 |
[ "${ARCH}" = "alpha" ] && append-flags -fPIC |
181 |
|
182 |
# http://bugs.gentoo.org/show_bug.cgi?id=50309 |
183 |
if is-flag -O3; then |
184 |
is-flag -fstack-protector-all && replace-flags -O3 -O2 |
185 |
use hardened && replace-flags -O3 -O2 |
186 |
fi |
187 |
|
188 |
# See #228905 |
189 |
if [[ $(gcc-major-version) -ge 4 ]]; then |
190 |
append-flags -fwrapv |
191 |
fi |
192 |
|
193 |
export OPT="${CFLAGS}" |
194 |
|
195 |
local myconf |
196 |
|
197 |
# super-secret switch. don't use this unless you know what you're |
198 |
# doing. enabling UCS2 support will break your existing python |
199 |
# modules |
200 |
use ucs2 \ |
201 |
&& myconf="${myconf} --enable-unicode=ucs2" \ |
202 |
|| myconf="${myconf} --enable-unicode=ucs4" |
203 |
|
204 |
use threads \ |
205 |
&& myconf="${myconf} --with-threads" \ |
206 |
|| myconf="${myconf} --without-threads" |
207 |
|
208 |
src_configure |
209 |
|
210 |
if tc-is-cross-compiler ; then |
211 |
OPT="-O1" CFLAGS="" LDFLAGS="" CC="" \ |
212 |
./configure || die "cross-configure failed" |
213 |
emake python Parser/pgen || die "cross-make failed" |
214 |
mv python hostpython |
215 |
mv Parser/pgen Parser/hostpgen |
216 |
make distclean |
217 |
sed -i \ |
218 |
-e '/^HOSTPYTHON/s:=.*:=./hostpython:' \ |
219 |
-e '/^HOSTPGEN/s:=.*:=./Parser/hostpgen:' \ |
220 |
Makefile.pre.in || die |
221 |
fi |
222 |
|
223 |
# export CXX so it ends up in /usr/lib/python2.x/config/Makefile |
224 |
tc-export CXX |
225 |
|
226 |
# set LDFLAGS so we link modules with -lpython2.5 correctly. |
227 |
# Needed on FreeBSD unless python2.5 is already installed. |
228 |
# Please query BSD team before removing this! |
229 |
append-ldflags "-L." |
230 |
|
231 |
econf \ |
232 |
--with-fpectl \ |
233 |
--enable-shared \ |
234 |
`use_enable ipv6` \ |
235 |
--infodir='${prefix}'/share/info \ |
236 |
--mandir='${prefix}'/share/man \ |
237 |
--with-libc='' \ |
238 |
${myconf} || die |
239 |
emake || die "Parallel make failed" |
240 |
} |
241 |
|
242 |
src_install() { |
243 |
dodir /usr |
244 |
src_configure |
245 |
make DESTDIR="${D}" altinstall maninstall || die |
246 |
|
247 |
mv "${D}"/usr/bin/python${PYVER}-config |
248 |
"${D}"/usr/bin/python-config-${PYVER} |
249 |
|
250 |
# Fix slotted collisions |
251 |
mv "${D}"/usr/bin/pydoc "${D}"/usr/bin/pydoc${PYVER} |
252 |
mv "${D}"/usr/bin/idle "${D}"/usr/bin/idle${PYVER} |
253 |
mv "${D}"/usr/share/man/man1/python.1 \ |
254 |
"${D}"/usr/share/man/man1/python${PYVER}.1 |
255 |
rm -f "${D}"/usr/bin/smtpd.py |
256 |
|
257 |
# While we're working on the config stuff... Let's fix the OPT var |
258 |
# so that it doesn't have any opts listed in it. Prevents the problem |
259 |
# with compiling things with conflicting opts later. |
260 |
dosed -e 's:^OPT=.*:OPT=-DNDEBUG:' \ |
261 |
/usr/$(get_libdir)/python${PYVER}/config/Makefile |
262 |
|
263 |
if use build ; then |
264 |
rm -rf |
265 |
"${D}"/usr/$(get_libdir)/python${PYVER}/{test,encodings,email,lib-tk,bsddb/test} |
266 |
else |
267 |
use elibc_uclibc && rm -rf |
268 |
"${D}"/usr/$(get_libdir)/python${PYVER}/{test,bsddb/test} |
269 |
use berkdb || rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/bsddb |
270 |
use tk || rm -rf "${D}"/usr/$(get_libdir)/python${PYVER}/lib-tk |
271 |
fi |
272 |
|
273 |
prep_ml_includes usr/include/python${PYVER} |
274 |
|
275 |
# The stuff below this line extends from 2.1, and should be deprecated |
276 |
# in 2.3, or possibly can wait till 2.4 |
277 |
|
278 |
# seems like the build do not install Makefile.pre.in anymore |
279 |
# it probably shouldn't - use DistUtils, people! |
280 |
insinto /usr/$(get_libdir)/python${PYVER}/config |
281 |
doins "${S}"/Makefile.pre.in |
282 |
|
283 |
if use examples ; then |
284 |
insinto /usr/share/doc/${PF}/examples |
285 |
doins -r "${S}"/Tools || die "doins failed" |
286 |
fi |
287 |
|
288 |
newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} |
289 |
newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} |
290 |
} |
291 |
|
292 |
pkg_postrm() { |
293 |
local mansuffix=$(ecompress --suffix) |
294 |
python_makesym |
295 |
alternatives_auto_makesym "/usr/bin/idle" "idle[0-9].[0-9]" |
296 |
alternatives_auto_makesym "/usr/bin/pydoc" "pydoc[0-9].[0-9]" |
297 |
alternatives_auto_makesym "/usr/bin/python-config" \ |
298 |
"python-config-[0-9].[0-9]" |
299 |
|
300 |
alternatives_auto_makesym "/usr/share/man/man1/python.1${mansuffix}" \ |
301 |
"python[0-9].[0-9].1${mansuffix}" |
302 |
|
303 |
python_mod_cleanup /usr/lib/python${PYVER} |
304 |
[[ "$(get_libdir)" == "lib" ]] || \ |
305 |
python_mod_cleanup /usr/$(get_libdir)/python${PYVER} |
306 |
} |
307 |
|
308 |
pkg_postinst() { |
309 |
local myroot |
310 |
myroot=$(echo $ROOT | sed 's:/$::') |
311 |
local mansuffix=$(ecompress --suffix) |
312 |
|
313 |
python_makesym |
314 |
alternatives_auto_makesym "/usr/bin/idle" "idle[0-9].[0-9]" |
315 |
alternatives_auto_makesym "/usr/bin/pydoc" "pydoc[0-9].[0-9]" |
316 |
alternatives_auto_makesym "/usr/bin/python-config" \ |
317 |
"python-config-[0-9].[0-9]" |
318 |
|
319 |
alternatives_auto_makesym "/usr/share/man/man1/python.1${mansuffix}" \ |
320 |
"python[0-9].[0-9].1${mansuffix}" |
321 |
|
322 |
python_mod_optimize |
323 |
python_mod_optimize -x "(site-packages|test)" \ |
324 |
/usr/lib/python${PYVER} |
325 |
[[ "$(get_libdir)" == "lib" ]] || \ |
326 |
python_mod_optimize -x "(site-packages|test)" \ |
327 |
/usr/$(get_libdir)/python${PYVER} |
328 |
|
329 |
# workaround possible python-upgrade-breaks-portage situation |
330 |
if [ ! -f ${myroot}/usr/lib/portage/pym/portage.py ]; then |
331 |
if [ -f ${myroot}/usr/lib/python2.3/site-packages/portage.py ]; then |
332 |
einfo "Working around possible python-portage upgrade breakage" |
333 |
mkdir -p ${myroot}/usr/lib/portage/pym |
334 |
cp |
335 |
${myroot}/usr/lib/python2.4/site-packages/{portage,xpak,output,cvstree,getbinpkg,emergehelp,dispatch_conf}.py |
336 |
${myroot}/usr/lib/portage/pym |
337 |
python_mod_optimize /usr/lib/portage/pym |
338 |
fi |
339 |
fi |
340 |
|
341 |
echo |
342 |
ewarn |
343 |
ewarn "If you have just upgraded from an older version of python you will" |
344 |
ewarn "need to run:" |
345 |
ewarn |
346 |
ewarn "/usr/sbin/python-updater" |
347 |
ewarn |
348 |
ewarn "This will automatically rebuild all the python dependent modules" |
349 |
ewarn "to run with python-${PYVER}." |
350 |
ewarn |
351 |
ewarn "Your original Python is still installed and can be accessed via" |
352 |
ewarn "/usr/bin/python2.x." |
353 |
ewarn |
354 |
ebeep 5 |
355 |
} |
356 |
|
357 |
src_test() { |
358 |
# Tests won't work when cross compiling |
359 |
if tc-is-cross-compiler ; then |
360 |
elog "Disabling tests due to crosscompiling." |
361 |
return |
362 |
fi |
363 |
|
364 |
# Disabling byte compiling breaks test_import |
365 |
python_enable_pyc |
366 |
|
367 |
#skip all tests that fail during emerge but pass without emerge: |
368 |
#(See bug# 67970) |
369 |
local skip_tests="distutils global mimetools minidom mmap posix pyexpat sax |
370 |
strptime subprocess syntax tcl time urllib urllib2 webbrowser xml_etree" |
371 |
|
372 |
# test_pow fails on alpha. |
373 |
# http://bugs.python.org/issue756093 |
374 |
[[ ${ARCH} == "alpha" ]] && skip_tests="${skip_tests} pow" |
375 |
|
376 |
for test in ${skip_tests} ; do |
377 |
mv "${S}"/Lib/test/test_${test}.py "${T}" |
378 |
done |
379 |
|
380 |
# rerun failed tests in verbose mode (regrtest -w) |
381 |
EXTRATESTOPTS="-w" make test || die "make test failed" |
382 |
|
383 |
for test in ${skip_tests} ; do |
384 |
mv "${T}"/test_${test}.py "${S}"/Lib/test/test_${test}.py |
385 |
done |
386 |
|
387 |
elog "Portage skipped the following tests which aren't able to run from |
388 |
emerge:" |
389 |
for test in ${skip_tests} ; do |
390 |
elog "test_${test}.py" |
391 |
done |
392 |
|
393 |
elog "If you'd like to run them, you may:" |
394 |
elog "cd /usr/lib/python${PYVER}/test" |
395 |
elog "and run the tests separately." |
396 |
} |