1 |
floppym 15/05/28 04:10:47 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: python-2.7.10.ebuild |
5 |
Log: |
6 |
Version bump. |
7 |
|
8 |
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.819 dev-lang/python/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.819&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.819&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?r1=1.818&r2=1.819 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v |
20 |
retrieving revision 1.818 |
21 |
retrieving revision 1.819 |
22 |
diff -u -r1.818 -r1.819 |
23 |
--- ChangeLog 23 Apr 2015 19:25:27 -0000 1.818 |
24 |
+++ ChangeLog 28 May 2015 04:10:47 -0000 1.819 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for dev-lang/python |
27 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.818 2015/04/23 19:25:27 floppym Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.819 2015/05/28 04:10:47 floppym Exp $ |
30 |
+ |
31 |
+*python-2.7.10 (28 May 2015) |
32 |
+ |
33 |
+ 28 May 2015; Mike Gilbert <floppym@g.o> |
34 |
+ +files/python-2.7.10-semaphore-pid.patch, +python-2.7.10.ebuild: |
35 |
+ Version bump. |
36 |
|
37 |
23 Apr 2015; Mike Gilbert <floppym@g.o> python-2.6.9.ebuild: |
38 |
Fix dep on eselect-python. |
39 |
|
40 |
|
41 |
|
42 |
1.1 dev-lang/python/python-2.7.10.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.10.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-2.7.10.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: python-2.7.10.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2015 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.10.ebuild,v 1.1 2015/05/28 04:10:47 floppym Exp $ |
52 |
|
53 |
EAPI="4" |
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.10-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-eselect/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 |
epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch" |
150 |
epatch "${FILESDIR}/python-2.7.10-semaphore-pid.patch" |
151 |
|
152 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
153 |
Lib/distutils/command/install.py \ |
154 |
Lib/distutils/sysconfig.py \ |
155 |
Lib/site.py \ |
156 |
Lib/sysconfig.py \ |
157 |
Lib/test/test_site.py \ |
158 |
Makefile.pre.in \ |
159 |
Modules/Setup.dist \ |
160 |
Modules/getpath.c \ |
161 |
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
162 |
|
163 |
epatch_user |
164 |
|
165 |
eautoreconf |
166 |
} |
167 |
|
168 |
src_configure() { |
169 |
if use build; then |
170 |
# Disable extraneous modules with extra dependencies. |
171 |
export PYTHON_DISABLE_MODULES="dbm _bsddb gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" |
172 |
export PYTHON_DISABLE_SSL="1" |
173 |
else |
174 |
# dbm module can be linked against berkdb or gdbm. |
175 |
# Defaults to gdbm when both are enabled, #204343. |
176 |
local disable |
177 |
use berkdb || use gdbm || disable+=" dbm" |
178 |
use berkdb || disable+=" _bsddb" |
179 |
use gdbm || disable+=" gdbm" |
180 |
use ncurses || disable+=" _curses _curses_panel" |
181 |
use readline || disable+=" readline" |
182 |
use sqlite || disable+=" _sqlite3" |
183 |
use ssl || export PYTHON_DISABLE_SSL="1" |
184 |
use tk || disable+=" _tkinter" |
185 |
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
186 |
export PYTHON_DISABLE_MODULES="${disable}" |
187 |
|
188 |
if ! use xml; then |
189 |
ewarn "You have configured Python without XML support." |
190 |
ewarn "This is NOT a recommended configuration as you" |
191 |
ewarn "may face problems parsing any XML documents." |
192 |
fi |
193 |
fi |
194 |
|
195 |
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
196 |
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
197 |
fi |
198 |
|
199 |
if [[ "$(gcc-major-version)" -ge 4 ]]; then |
200 |
append-flags -fwrapv |
201 |
fi |
202 |
|
203 |
filter-flags -malign-double |
204 |
|
205 |
[[ "${ARCH}" == "alpha" ]] && append-flags -fPIC |
206 |
|
207 |
# https://bugs.gentoo.org/show_bug.cgi?id=50309 |
208 |
if is-flagq -O3; then |
209 |
is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
210 |
use hardened && replace-flags -O3 -O2 |
211 |
fi |
212 |
|
213 |
if tc-is-cross-compiler; then |
214 |
# Force some tests that try to poke fs paths. |
215 |
export ac_cv_file__dev_ptc=no |
216 |
export ac_cv_file__dev_ptmx=yes |
217 |
fi |
218 |
|
219 |
# Export CXX so it ends up in /usr/lib/python2.X/config/Makefile. |
220 |
tc-export CXX |
221 |
# The configure script fails to use pkg-config correctly. |
222 |
# http://bugs.python.org/issue15506 |
223 |
export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
224 |
|
225 |
# Set LDFLAGS so we link modules with -lpython2.7 correctly. |
226 |
# Needed on FreeBSD unless Python 2.7 is already installed. |
227 |
# Please query BSD team before removing this! |
228 |
append-ldflags "-L." |
229 |
|
230 |
local dbmliborder |
231 |
if use gdbm; then |
232 |
dbmliborder+="${dbmliborder:+:}gdbm" |
233 |
fi |
234 |
if use berkdb; then |
235 |
dbmliborder+="${dbmliborder:+:}bdb" |
236 |
fi |
237 |
|
238 |
BUILD_DIR="${WORKDIR}/${CHOST}" |
239 |
mkdir -p "${BUILD_DIR}" || die |
240 |
cd "${BUILD_DIR}" || die |
241 |
|
242 |
ECONF_SOURCE="${S}" OPT="" \ |
243 |
econf \ |
244 |
--with-fpectl \ |
245 |
--enable-shared \ |
246 |
$(use_enable ipv6) \ |
247 |
$(use_with threads) \ |
248 |
$(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \ |
249 |
--infodir='${prefix}/share/info' \ |
250 |
--mandir='${prefix}/share/man' \ |
251 |
--with-dbmliborder="${dbmliborder}" \ |
252 |
--with-libc="" \ |
253 |
--enable-loadable-sqlite-extensions \ |
254 |
--with-system-expat \ |
255 |
--with-system-ffi \ |
256 |
--without-ensurepip |
257 |
|
258 |
if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
259 |
eerror "configure has detected that the sem_open function is broken." |
260 |
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
261 |
die "Broken sem_open function (bug 496328)" |
262 |
fi |
263 |
} |
264 |
|
265 |
src_compile() { |
266 |
# Avoid invoking pgen for cross-compiles. |
267 |
touch Include/graminit.h Python/graminit.c |
268 |
|
269 |
cd "${BUILD_DIR}" || die |
270 |
emake |
271 |
|
272 |
# Work around bug 329499. See also bug 413751 and 457194. |
273 |
if has_version dev-libs/libffi[pax_kernel]; then |
274 |
pax-mark E python |
275 |
else |
276 |
pax-mark m python |
277 |
fi |
278 |
} |
279 |
|
280 |
src_test() { |
281 |
# Tests will not work when cross compiling. |
282 |
if tc-is-cross-compiler; then |
283 |
elog "Disabling tests due to crosscompiling." |
284 |
return |
285 |
fi |
286 |
|
287 |
cd "${BUILD_DIR}" || die |
288 |
|
289 |
# Skip failing tests. |
290 |
local skipped_tests="distutils gdb" |
291 |
|
292 |
for test in ${skipped_tests}; do |
293 |
mv "${S}"/Lib/test/test_${test}.py "${T}" |
294 |
done |
295 |
|
296 |
# Rerun failed tests in verbose mode (regrtest -w). |
297 |
emake test EXTRATESTOPTS="-w" < /dev/tty |
298 |
local result="$?" |
299 |
|
300 |
for test in ${skipped_tests}; do |
301 |
mv "${T}/test_${test}.py" "${S}"/Lib/test |
302 |
done |
303 |
|
304 |
elog "The following tests have been skipped:" |
305 |
for test in ${skipped_tests}; do |
306 |
elog "test_${test}.py" |
307 |
done |
308 |
|
309 |
elog "If you would like to run them, you may:" |
310 |
elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" |
311 |
elog "and run the tests separately." |
312 |
|
313 |
if [[ "${result}" -ne 0 ]]; then |
314 |
die "emake test failed" |
315 |
fi |
316 |
} |
317 |
|
318 |
src_install() { |
319 |
local libdir=${ED}/usr/$(get_libdir)/python${SLOT} |
320 |
|
321 |
cd "${BUILD_DIR}" || die |
322 |
emake DESTDIR="${D}" altinstall |
323 |
|
324 |
sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" |
325 |
|
326 |
# Backwards compat with Gentoo divergence. |
327 |
dosym python${SLOT}-config /usr/bin/python-config-${SLOT} |
328 |
|
329 |
# Fix collisions between different slots of Python. |
330 |
mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" |
331 |
mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" |
332 |
mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" |
333 |
rm -f "${ED}usr/bin/smtpd.py" |
334 |
|
335 |
if use build; then |
336 |
rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{bsddb,dbhash.py,idlelib,lib-tk,sqlite3,test} |
337 |
else |
338 |
use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die |
339 |
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die |
340 |
use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die |
341 |
use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} |
342 |
fi |
343 |
|
344 |
use threads || rm -r "${libdir}/multiprocessing" || die |
345 |
use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die |
346 |
|
347 |
dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
348 |
|
349 |
if use examples; then |
350 |
insinto /usr/share/doc/${PF}/examples |
351 |
doins -r "${S}"/Tools |
352 |
fi |
353 |
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
354 |
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
355 |
emake --no-print-directory -s -f - 2>/dev/null) |
356 |
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
357 |
|
358 |
newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} |
359 |
newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} |
360 |
sed \ |
361 |
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ |
362 |
-e "s:@PYDOC@:pydoc${SLOT}:" \ |
363 |
-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" |
364 |
|
365 |
# for python-exec |
366 |
python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR |
367 |
|
368 |
# if not using a cross-compiler, use the fresh binary |
369 |
if ! tc-is-cross-compiler; then |
370 |
local PYTHON=./python |
371 |
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. |
372 |
fi |
373 |
|
374 |
echo "EPYTHON='${EPYTHON}'" > epython.py |
375 |
python_domodule epython.py |
376 |
} |
377 |
|
378 |
pkg_preinst() { |
379 |
if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version "${CATEGORY}/${PN}:2.7"; then |
380 |
python_updater_warning="1" |
381 |
fi |
382 |
} |
383 |
|
384 |
eselect_python_update() { |
385 |
if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
386 |
eselect python update |
387 |
fi |
388 |
|
389 |
if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
390 |
eselect python update --python${PV%%.*} |
391 |
fi |
392 |
} |
393 |
|
394 |
pkg_postinst() { |
395 |
eselect_python_update |
396 |
|
397 |
if [[ "${python_updater_warning}" == "1" ]]; then |
398 |
ewarn "You have just upgraded from an older version of Python." |
399 |
ewarn "You should switch active version of Python ${PV%%.*} and run" |
400 |
ewarn "'python-updater [options]' to rebuild Python modules." |
401 |
fi |
402 |
} |
403 |
|
404 |
pkg_postrm() { |
405 |
eselect_python_update |
406 |
} |