1 |
floppym 13/12/01 17:33:19 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: python-2.7.6.ebuild |
5 |
Log: |
6 |
Version bump. Thanks to Arfrever for the patches. |
7 |
|
8 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.717 dev-lang/python/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.717&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.717&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?r1=1.716&r2=1.717 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v |
20 |
retrieving revision 1.716 |
21 |
retrieving revision 1.717 |
22 |
diff -u -r1.716 -r1.717 |
23 |
--- ChangeLog 30 Nov 2013 16:03:40 -0000 1.716 |
24 |
+++ ChangeLog 1 Dec 2013 17:33:19 -0000 1.717 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for dev-lang/python |
27 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.716 2013/11/30 16:03:40 jer Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.717 2013/12/01 17:33:19 floppym Exp $ |
30 |
+ |
31 |
+*python-2.7.6 (01 Dec 2013) |
32 |
+ |
33 |
+ 01 Dec 2013; Mike Gilbert <floppym@g.o> +python-2.7.6.ebuild: |
34 |
+ Version bump. Thanks to Arfrever for the patches. |
35 |
|
36 |
30 Nov 2013; Jeroen Roovers <jer@g.o> python-3.3.2-r2.ebuild: |
37 |
Stable for HPPA (bug #474128). |
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-lang/python/python-2.7.6.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.6.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.6.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: python-2.7.6.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2013 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.7.6.ebuild,v 1.1 2013/12/01 17:33:19 floppym Exp $ |
51 |
|
52 |
EAPI="4" |
53 |
WANT_AUTOMAKE="none" |
54 |
WANT_LIBTOOL="none" |
55 |
|
56 |
inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing |
57 |
|
58 |
MY_P="Python-${PV}" |
59 |
PATCHSET_REVISION="0" |
60 |
|
61 |
DESCRIPTION="An interpreted, interactive, object-oriented programming language" |
62 |
HOMEPAGE="http://www.python.org/" |
63 |
SRC_URI="http://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz |
64 |
mirror://gentoo/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz |
65 |
http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz" |
66 |
|
67 |
LICENSE="PSF-2" |
68 |
SLOT="2.7" |
69 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
70 |
IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" |
71 |
|
72 |
# Do not add a dependency on dev-lang/python to this ebuild. |
73 |
# If you need to apply a patch which requires python for bootstrapping, please |
74 |
# run the bootstrap code on your dev box and include the results in the |
75 |
# patchset. See bug 447752. |
76 |
|
77 |
RDEPEND="app-arch/bzip2 |
78 |
>=sys-libs/zlib-1.1.3 |
79 |
virtual/libffi |
80 |
virtual/libintl |
81 |
!build? ( |
82 |
berkdb? ( || ( |
83 |
sys-libs/db:5.3 |
84 |
sys-libs/db:5.2 |
85 |
sys-libs/db:5.1 |
86 |
sys-libs/db:5.0 |
87 |
sys-libs/db:4.8 |
88 |
sys-libs/db:4.7 |
89 |
sys-libs/db:4.6 |
90 |
sys-libs/db:4.5 |
91 |
sys-libs/db:4.4 |
92 |
sys-libs/db:4.3 |
93 |
sys-libs/db:4.2 |
94 |
) ) |
95 |
gdbm? ( sys-libs/gdbm[berkdb] ) |
96 |
ncurses? ( |
97 |
>=sys-libs/ncurses-5.2 |
98 |
readline? ( >=sys-libs/readline-4.1 ) |
99 |
) |
100 |
sqlite? ( >=dev-db/sqlite-3.3.8:3 ) |
101 |
ssl? ( dev-libs/openssl ) |
102 |
tk? ( |
103 |
>=dev-lang/tk-8.0 |
104 |
dev-tcltk/blt |
105 |
) |
106 |
xml? ( >=dev-libs/expat-2.1 ) |
107 |
) |
108 |
!!<sys-apps/portage-2.1.9" |
109 |
DEPEND="${RDEPEND} |
110 |
virtual/pkgconfig |
111 |
>=sys-devel/autoconf-2.65 |
112 |
!sys-devel/gcc[libffi]" |
113 |
RDEPEND+=" !build? ( app-misc/mime-types ) |
114 |
doc? ( dev-python/python-docs:${SLOT} )" |
115 |
PDEPEND="app-admin/eselect-python |
116 |
app-admin/python-updater" |
117 |
|
118 |
S="${WORKDIR}/${MY_P}" |
119 |
|
120 |
pkg_setup() { |
121 |
if use berkdb; then |
122 |
ewarn "'bsddb' module is out-of-date and no longer maintained inside" |
123 |
ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally" |
124 |
ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module" |
125 |
ewarn "is provided by dev-python/bsddb3." |
126 |
else |
127 |
if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then |
128 |
ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]" |
129 |
ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]." |
130 |
ewarn "You might need to migrate your databases." |
131 |
fi |
132 |
fi |
133 |
} |
134 |
|
135 |
src_prepare() { |
136 |
# Ensure that internal copies of expat, libffi and zlib are not used. |
137 |
rm -r Modules/expat || die |
138 |
rm -r Modules/_ctypes/libffi* || die |
139 |
rm -r Modules/zlib || die |
140 |
|
141 |
if tc-is-cross-compiler; then |
142 |
local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" |
143 |
fi |
144 |
|
145 |
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
146 |
|
147 |
# Fix for cross-compiling. |
148 |
epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch" |
149 |
|
150 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
151 |
Lib/distutils/command/install.py \ |
152 |
Lib/distutils/sysconfig.py \ |
153 |
Lib/site.py \ |
154 |
Lib/sysconfig.py \ |
155 |
Lib/test/test_site.py \ |
156 |
Makefile.pre.in \ |
157 |
Modules/Setup.dist \ |
158 |
Modules/getpath.c \ |
159 |
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
160 |
|
161 |
epatch_user |
162 |
|
163 |
eautoconf |
164 |
eautoheader |
165 |
} |
166 |
|
167 |
src_configure() { |
168 |
if use build; then |
169 |
# Disable extraneous modules with extra dependencies. |
170 |
export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" |
171 |
export PYTHON_DISABLE_SSL="1" |
172 |
else |
173 |
# dbm module can be linked against berkdb or gdbm. |
174 |
# Defaults to gdbm when both are enabled, #204343. |
175 |
local disable |
176 |
use berkdb || use gdbm || disable+=" dbm" |
177 |
use berkdb || disable+=" _bsddb" |
178 |
use gdbm || disable+=" gdbm" |
179 |
use ncurses || disable+=" _curses _curses_panel" |
180 |
use readline || disable+=" readline" |
181 |
use sqlite || disable+=" _sqlite3" |
182 |
use ssl || export PYTHON_DISABLE_SSL="1" |
183 |
use tk || disable+=" _tkinter" |
184 |
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
185 |
export PYTHON_DISABLE_MODULES="${disable}" |
186 |
|
187 |
if ! use xml; then |
188 |
ewarn "You have configured Python without XML support." |
189 |
ewarn "This is NOT a recommended configuration as you" |
190 |
ewarn "may face problems parsing any XML documents." |
191 |
fi |
192 |
fi |
193 |
|
194 |
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
195 |
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
196 |
fi |
197 |
|
198 |
if [[ "$(gcc-major-version)" -ge 4 ]]; then |
199 |
append-flags -fwrapv |
200 |
fi |
201 |
|
202 |
filter-flags -malign-double |
203 |
|
204 |
[[ "${ARCH}" == "alpha" ]] && append-flags -fPIC |
205 |
|
206 |
# https://bugs.gentoo.org/show_bug.cgi?id=50309 |
207 |
if is-flagq -O3; then |
208 |
is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
209 |
use hardened && replace-flags -O3 -O2 |
210 |
fi |
211 |
|
212 |
# Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. |
213 |
tc-export CXX |
214 |
# The configure script fails to use pkg-config correctly. |
215 |
# http://bugs.python.org/issue15506 |
216 |
export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
217 |
|
218 |
# Set LDFLAGS so we link modules with -lpython2.7 correctly. |
219 |
# Needed on FreeBSD unless Python 2.7 is already installed. |
220 |
# Please query BSD team before removing this! |
221 |
append-ldflags "-L." |
222 |
|
223 |
local dbmliborder |
224 |
if use gdbm; then |
225 |
dbmliborder+="${dbmliborder:+:}gdbm" |
226 |
fi |
227 |
if use berkdb; then |
228 |
dbmliborder+="${dbmliborder:+:}bdb" |
229 |
fi |
230 |
|
231 |
BUILD_DIR="${WORKDIR}/${CHOST}" |
232 |
mkdir -p "${BUILD_DIR}" || die |
233 |
cd "${BUILD_DIR}" || die |
234 |
|
235 |
ECONF_SOURCE="${S}" OPT="" \ |
236 |
econf \ |
237 |
--with-fpectl \ |
238 |
--enable-shared \ |
239 |
$(use_enable ipv6) \ |
240 |
$(use_with threads) \ |
241 |
$(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ |
242 |
--infodir='${prefix}/share/info' \ |
243 |
--mandir='${prefix}/share/man' \ |
244 |
--with-dbmliborder="${dbmliborder}" \ |
245 |
--with-libc="" \ |
246 |
--enable-loadable-sqlite-extensions \ |
247 |
--with-system-expat \ |
248 |
--with-system-ffi |
249 |
} |
250 |
|
251 |
src_compile() { |
252 |
# Avoid invoking pgen for cross-compiles. |
253 |
touch Include/graminit.h Python/graminit.c |
254 |
|
255 |
cd "${BUILD_DIR}" || die |
256 |
emake |
257 |
|
258 |
# Work around bug 329499. See also bug 413751 and 457194. |
259 |
if has_version dev-libs/libffi[pax_kernel]; then |
260 |
pax-mark E python |
261 |
else |
262 |
pax-mark m python |
263 |
fi |
264 |
} |
265 |
|
266 |
src_test() { |
267 |
# Tests will not work when cross compiling. |
268 |
if tc-is-cross-compiler; then |
269 |
elog "Disabling tests due to crosscompiling." |
270 |
return |
271 |
fi |
272 |
|
273 |
cd "${BUILD_DIR}" || die |
274 |
|
275 |
# Skip failing tests. |
276 |
local skipped_tests="distutils gdb" |
277 |
|
278 |
for test in ${skipped_tests}; do |
279 |
mv "${S}"/Lib/test/test_${test}.py "${T}" |
280 |
done |
281 |
|
282 |
# Rerun failed tests in verbose mode (regrtest -w). |
283 |
emake test EXTRATESTOPTS="-w" < /dev/tty |
284 |
local result="$?" |
285 |
|
286 |
for test in ${skipped_tests}; do |
287 |
mv "${T}/test_${test}.py" "${S}"/Lib/test |
288 |
done |
289 |
|
290 |
elog "The following tests have been skipped:" |
291 |
for test in ${skipped_tests}; do |
292 |
elog "test_${test}.py" |
293 |
done |
294 |
|
295 |
elog "If you would like to run them, you may:" |
296 |
elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" |
297 |
elog "and run the tests separately." |
298 |
|
299 |
if [[ "${result}" -ne 0 ]]; then |
300 |
die "emake test failed" |
301 |
fi |
302 |
} |
303 |
|
304 |
src_install() { |
305 |
local libdir=${ED}/usr/$(get_libdir)/python${SLOT} |
306 |
|
307 |
cd "${BUILD_DIR}" || die |
308 |
emake DESTDIR="${D}" altinstall |
309 |
|
310 |
sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" |
311 |
|
312 |
# Backwards compat with Gentoo divergence. |
313 |
dosym python${SLOT}-config /usr/bin/python-config-${SLOT} |
314 |
|
315 |
# Fix collisions between different slots of Python. |
316 |
mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" |
317 |
mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" |
318 |
mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" |
319 |
rm -f "${ED}usr/bin/smtpd.py" |
320 |
|
321 |
if use build; then |
322 |
rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test} |
323 |
else |
324 |
use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die |
325 |
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
326 |
use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die |
327 |
use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} |
328 |
fi |
329 |
|
330 |
use threads || rm -r "${libdir}/multiprocessing" || die |
331 |
use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die |
332 |
|
333 |
dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed" |
334 |
|
335 |
if use examples; then |
336 |
insinto /usr/share/doc/${PF}/examples |
337 |
doins -r "${S}"/Tools |
338 |
fi |
339 |
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
340 |
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
341 |
emake --no-print-directory -s -f - 2>/dev/null) |
342 |
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
343 |
|
344 |
newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} |
345 |
newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} |
346 |
sed \ |
347 |
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ |
348 |
-e "s:@PYDOC@:pydoc${SLOT}:" \ |
349 |
-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" |
350 |
|
351 |
# for python-exec |
352 |
python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR |
353 |
|
354 |
# if not using a cross-compiler, use the fresh binary |
355 |
if ! tc-is-cross-compiler; then |
356 |
local PYTHON=./python |
357 |
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. |
358 |
fi |
359 |
|
360 |
echo "EPYTHON='${EPYTHON}'" > epython.py |
361 |
python_domodule epython.py |
362 |
} |
363 |
|
364 |
pkg_preinst() { |
365 |
if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; then |
366 |
python_updater_warning="1" |
367 |
fi |
368 |
} |
369 |
|
370 |
eselect_python_update() { |
371 |
if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
372 |
eselect python update |
373 |
fi |
374 |
|
375 |
if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
376 |
eselect python update --python${PV%%.*} |
377 |
fi |
378 |
} |
379 |
|
380 |
pkg_postinst() { |
381 |
eselect_python_update |
382 |
|
383 |
if [[ "${python_updater_warning}" == "1" ]]; then |
384 |
ewarn "You have just upgraded from an older version of Python." |
385 |
ewarn "You should switch active version of Python ${PV%%.*} and run" |
386 |
ewarn "'python-updater [options]' to rebuild Python modules." |
387 |
fi |
388 |
} |
389 |
|
390 |
pkg_postrm() { |
391 |
eselect_python_update |
392 |
} |