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