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