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