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