1 |
chutzpah 14/07/29 22:51:43 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: python-2.7.8.ebuild |
5 |
Log: |
6 |
Version bump. |
7 |
|
8 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0xE3F69979BB4B8928DA78E3D17CBF44EF) |
9 |
|
10 |
Revision Changes Path |
11 |
1.767 dev-lang/python/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.767&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.767&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?r1=1.766&r2=1.767 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v |
20 |
retrieving revision 1.766 |
21 |
retrieving revision 1.767 |
22 |
diff -u -r1.766 -r1.767 |
23 |
--- ChangeLog 29 Jul 2014 07:53:03 -0000 1.766 |
24 |
+++ ChangeLog 29 Jul 2014 22:51:43 -0000 1.767 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for dev-lang/python |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.766 2014/07/29 07:53:03 pinkbyte Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.767 2014/07/29 22:51:43 chutzpah Exp $ |
30 |
+ |
31 |
+*python-2.7.8 (29 Jul 2014) |
32 |
+ |
33 |
+ 29 Jul 2014; Patrick McLean <chutzpah@g.o> +python-2.7.8.ebuild: |
34 |
+ Version bump. |
35 |
|
36 |
*python-3.2.5-r6 (29 Jul 2014) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-lang/python/python-2.7.8.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.8.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.8.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: python-2.7.8.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2014 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.8.ebuild,v 1.1 2014/07/29 22:51:43 chutzpah 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_VERSION="2.7.7-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 |
http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
65 |
|
66 |
LICENSE="PSF-2" |
67 |
SLOT="2.7" |
68 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
69 |
IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" |
70 |
|
71 |
# Do not add a dependency on dev-lang/python to this ebuild. |
72 |
# If you need to apply a patch which requires python for bootstrapping, please |
73 |
# run the bootstrap code on your dev box and include the results in the |
74 |
# patchset. See bug 447752. |
75 |
|
76 |
RDEPEND="app-arch/bzip2 |
77 |
>=sys-libs/zlib-1.1.3 |
78 |
virtual/libffi |
79 |
virtual/libintl |
80 |
!build? ( |
81 |
berkdb? ( || ( |
82 |
sys-libs/db:5.3 |
83 |
sys-libs/db:5.2 |
84 |
sys-libs/db:5.1 |
85 |
sys-libs/db:5.0 |
86 |
sys-libs/db:4.8 |
87 |
sys-libs/db:4.7 |
88 |
sys-libs/db:4.6 |
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 |
gdbm? ( sys-libs/gdbm[berkdb] ) |
95 |
ncurses? ( |
96 |
>=sys-libs/ncurses-5.2 |
97 |
readline? ( >=sys-libs/readline-4.1 ) |
98 |
) |
99 |
sqlite? ( >=dev-db/sqlite-3.3.8:3 ) |
100 |
ssl? ( dev-libs/openssl ) |
101 |
tk? ( |
102 |
>=dev-lang/tk-8.0 |
103 |
dev-tcltk/blt |
104 |
dev-tcltk/tix |
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 |
if tc-is-cross-compiler; then |
213 |
# Force some tests that try to poke fs paths. |
214 |
export ac_cv_file__dev_ptc=no |
215 |
export ac_cv_file__dev_ptmx=yes |
216 |
fi |
217 |
|
218 |
# Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. |
219 |
tc-export CXX |
220 |
# The configure script fails to use pkg-config correctly. |
221 |
# http://bugs.python.org/issue15506 |
222 |
export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
223 |
|
224 |
# Set LDFLAGS so we link modules with -lpython2.7 correctly. |
225 |
# Needed on FreeBSD unless Python 2.7 is already installed. |
226 |
# Please query BSD team before removing this! |
227 |
append-ldflags "-L." |
228 |
|
229 |
local dbmliborder |
230 |
if use gdbm; then |
231 |
dbmliborder+="${dbmliborder:+:}gdbm" |
232 |
fi |
233 |
if use berkdb; then |
234 |
dbmliborder+="${dbmliborder:+:}bdb" |
235 |
fi |
236 |
|
237 |
BUILD_DIR="${WORKDIR}/${CHOST}" |
238 |
mkdir -p "${BUILD_DIR}" || die |
239 |
cd "${BUILD_DIR}" || die |
240 |
|
241 |
ECONF_SOURCE="${S}" OPT="" \ |
242 |
econf \ |
243 |
--with-fpectl \ |
244 |
--enable-shared \ |
245 |
$(use_enable ipv6) \ |
246 |
$(use_with threads) \ |
247 |
$(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ |
248 |
--infodir='${prefix}/share/info' \ |
249 |
--mandir='${prefix}/share/man' \ |
250 |
--with-dbmliborder="${dbmliborder}" \ |
251 |
--with-libc="" \ |
252 |
--enable-loadable-sqlite-extensions \ |
253 |
--with-system-expat \ |
254 |
--with-system-ffi |
255 |
|
256 |
if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
257 |
eerror "configure has detected that the sem_open function is broken." |
258 |
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
259 |
die "Broken sem_open function (bug 496328)" |
260 |
fi |
261 |
} |
262 |
|
263 |
src_compile() { |
264 |
# Avoid invoking pgen for cross-compiles. |
265 |
touch Include/graminit.h Python/graminit.c |
266 |
|
267 |
cd "${BUILD_DIR}" || die |
268 |
emake |
269 |
|
270 |
# Work around bug 329499. See also bug 413751 and 457194. |
271 |
if has_version dev-libs/libffi[pax_kernel]; then |
272 |
pax-mark E python |
273 |
else |
274 |
pax-mark m python |
275 |
fi |
276 |
} |
277 |
|
278 |
src_test() { |
279 |
# Tests will not work when cross compiling. |
280 |
if tc-is-cross-compiler; then |
281 |
elog "Disabling tests due to crosscompiling." |
282 |
return |
283 |
fi |
284 |
|
285 |
cd "${BUILD_DIR}" || die |
286 |
|
287 |
# Skip failing tests. |
288 |
local skipped_tests="distutils gdb" |
289 |
|
290 |
for test in ${skipped_tests}; do |
291 |
mv "${S}"/Lib/test/test_${test}.py "${T}" |
292 |
done |
293 |
|
294 |
# Rerun failed tests in verbose mode (regrtest -w). |
295 |
emake test EXTRATESTOPTS="-w" < /dev/tty |
296 |
local result="$?" |
297 |
|
298 |
for test in ${skipped_tests}; do |
299 |
mv "${T}/test_${test}.py" "${S}"/Lib/test |
300 |
done |
301 |
|
302 |
elog "The following tests have been skipped:" |
303 |
for test in ${skipped_tests}; do |
304 |
elog "test_${test}.py" |
305 |
done |
306 |
|
307 |
elog "If you would like to run them, you may:" |
308 |
elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" |
309 |
elog "and run the tests separately." |
310 |
|
311 |
if [[ "${result}" -ne 0 ]]; then |
312 |
die "emake test failed" |
313 |
fi |
314 |
} |
315 |
|
316 |
src_install() { |
317 |
local libdir=${ED}/usr/$(get_libdir)/python${SLOT} |
318 |
|
319 |
cd "${BUILD_DIR}" || die |
320 |
emake DESTDIR="${D}" altinstall |
321 |
|
322 |
sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" |
323 |
|
324 |
# Backwards compat with Gentoo divergence. |
325 |
dosym python${SLOT}-config /usr/bin/python-config-${SLOT} |
326 |
|
327 |
# Fix collisions between different slots of Python. |
328 |
mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" |
329 |
mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" |
330 |
mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" |
331 |
rm -f "${ED}usr/bin/smtpd.py" |
332 |
|
333 |
if use build; then |
334 |
rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test} |
335 |
else |
336 |
use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die |
337 |
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
338 |
use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die |
339 |
use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} |
340 |
fi |
341 |
|
342 |
use threads || rm -r "${libdir}/multiprocessing" || die |
343 |
use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die |
344 |
|
345 |
dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
346 |
|
347 |
if use examples; then |
348 |
insinto /usr/share/doc/${PF}/examples |
349 |
doins -r "${S}"/Tools |
350 |
fi |
351 |
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
352 |
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
353 |
emake --no-print-directory -s -f - 2>/dev/null) |
354 |
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
355 |
|
356 |
newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} |
357 |
newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} |
358 |
sed \ |
359 |
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ |
360 |
-e "s:@PYDOC@:pydoc${SLOT}:" \ |
361 |
-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" |
362 |
|
363 |
# for python-exec |
364 |
python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR |
365 |
|
366 |
# if not using a cross-compiler, use the fresh binary |
367 |
if ! tc-is-cross-compiler; then |
368 |
local PYTHON=./python |
369 |
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. |
370 |
fi |
371 |
|
372 |
echo "EPYTHON='${EPYTHON}'" > epython.py |
373 |
python_domodule epython.py |
374 |
} |
375 |
|
376 |
pkg_preinst() { |
377 |
if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; then |
378 |
python_updater_warning="1" |
379 |
fi |
380 |
} |
381 |
|
382 |
eselect_python_update() { |
383 |
if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
384 |
eselect python update |
385 |
fi |
386 |
|
387 |
if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
388 |
eselect python update --python${PV%%.*} |
389 |
fi |
390 |
} |
391 |
|
392 |
pkg_postinst() { |
393 |
eselect_python_update |
394 |
|
395 |
if [[ "${python_updater_warning}" == "1" ]]; then |
396 |
ewarn "You have just upgraded from an older version of Python." |
397 |
ewarn "You should switch active version of Python ${PV%%.*} and run" |
398 |
ewarn "'python-updater [options]' to rebuild Python modules." |
399 |
fi |
400 |
} |
401 |
|
402 |
pkg_postrm() { |
403 |
eselect_python_update |
404 |
} |