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