1 |
floppym 13/11/21 22:23:06 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: python-3.3.3.ebuild |
5 |
Log: |
6 |
Version bump. Thanks to Arfrever for maintaining the patchset. |
7 |
|
8 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.712 dev-lang/python/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.712&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.712&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?r1=1.711&r2=1.712 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v |
20 |
retrieving revision 1.711 |
21 |
retrieving revision 1.712 |
22 |
diff -u -r1.711 -r1.712 |
23 |
--- ChangeLog 26 Oct 2013 15:11:20 -0000 1.711 |
24 |
+++ ChangeLog 21 Nov 2013 22:23:06 -0000 1.712 |
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.711 2013/10/26 15:11:20 floppym Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.712 2013/11/21 22:23:06 floppym Exp $ |
30 |
+ |
31 |
+*python-3.3.3 (21 Nov 2013) |
32 |
+ |
33 |
+ 21 Nov 2013; Mike Gilbert <floppym@g.o> +python-3.3.3.ebuild: |
34 |
+ Version bump. Thanks to Arfrever for maintaining the patchset. |
35 |
|
36 |
*python-2.7.5-r4 (26 Oct 2013) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-lang/python/python-3.3.3.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.3.3.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.3.3.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: python-3.3.3.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-3.3.3.ebuild,v 1.1 2013/11/21 22:23:06 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 |
http://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz |
65 |
mirror://gentoo/python-gentoo-patches-${PV}-${PATCHSET_REVISION}.tar.xz" |
66 |
|
67 |
LICENSE="PSF-2" |
68 |
SLOT="3.3" |
69 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" |
70 |
IUSE="build doc elibc_uclibc examples gdbm hardened ipv6 +ncurses +readline sqlite +ssl +threads tk 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 |
app-arch/xz-utils |
79 |
>=sys-libs/zlib-1.1.3 |
80 |
virtual/libffi |
81 |
virtual/libintl |
82 |
!build? ( |
83 |
gdbm? ( sys-libs/gdbm[berkdb] ) |
84 |
ncurses? ( |
85 |
>=sys-libs/ncurses-5.2 |
86 |
readline? ( >=sys-libs/readline-4.1 ) |
87 |
) |
88 |
sqlite? ( >=dev-db/sqlite-3.3.8:3 ) |
89 |
ssl? ( dev-libs/openssl ) |
90 |
tk? ( |
91 |
>=dev-lang/tk-8.0 |
92 |
dev-tcltk/blt |
93 |
) |
94 |
xml? ( >=dev-libs/expat-2.1 ) |
95 |
) |
96 |
!!<sys-apps/sandbox-2.6-r1" |
97 |
DEPEND="${RDEPEND} |
98 |
virtual/pkgconfig |
99 |
>=sys-devel/autoconf-2.65 |
100 |
!sys-devel/gcc[libffi]" |
101 |
RDEPEND+=" !build? ( app-misc/mime-types ) |
102 |
doc? ( dev-python/python-docs:${SLOT} )" |
103 |
PDEPEND="app-admin/eselect-python |
104 |
app-admin/python-updater" |
105 |
|
106 |
S="${WORKDIR}/${MY_P}" |
107 |
|
108 |
src_prepare() { |
109 |
# Ensure that internal copies of expat, libffi and zlib are not used. |
110 |
rm -fr Modules/expat |
111 |
rm -fr Modules/_ctypes/libffi* |
112 |
rm -fr Modules/zlib |
113 |
|
114 |
if tc-is-cross-compiler; then |
115 |
# Invokes BUILDPYTHON, which is built for the host arch |
116 |
local EPATCH_EXCLUDE="05_all_regenerate_platform-specific_modules.patch" |
117 |
fi |
118 |
|
119 |
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
120 |
|
121 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
122 |
Lib/distutils/command/install.py \ |
123 |
Lib/distutils/sysconfig.py \ |
124 |
Lib/site.py \ |
125 |
Lib/sysconfig.py \ |
126 |
Lib/test/test_site.py \ |
127 |
Makefile.pre.in \ |
128 |
Modules/Setup.dist \ |
129 |
Modules/getpath.c \ |
130 |
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
131 |
|
132 |
# Disable ABI flags. |
133 |
sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed" |
134 |
|
135 |
epatch_user |
136 |
|
137 |
eautoconf |
138 |
eautoheader |
139 |
} |
140 |
|
141 |
src_configure() { |
142 |
if use build; then |
143 |
# Disable extraneous modules with extra dependencies. |
144 |
export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" |
145 |
export PYTHON_DISABLE_SSL="1" |
146 |
else |
147 |
local disable |
148 |
use gdbm || disable+=" gdbm" |
149 |
use ncurses || disable+=" _curses _curses_panel" |
150 |
use readline || disable+=" readline" |
151 |
use sqlite || disable+=" _sqlite3" |
152 |
use ssl || export PYTHON_DISABLE_SSL="1" |
153 |
use tk || disable+=" _tkinter" |
154 |
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
155 |
export PYTHON_DISABLE_MODULES="${disable}" |
156 |
|
157 |
if ! use xml; then |
158 |
ewarn "You have configured Python without XML support." |
159 |
ewarn "This is NOT a recommended configuration as you" |
160 |
ewarn "may face problems parsing any XML documents." |
161 |
fi |
162 |
fi |
163 |
|
164 |
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
165 |
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
166 |
fi |
167 |
|
168 |
if [[ "$(gcc-major-version)" -ge 4 ]]; then |
169 |
append-flags -fwrapv |
170 |
fi |
171 |
|
172 |
filter-flags -malign-double |
173 |
|
174 |
[[ "${ARCH}" == "alpha" ]] && append-flags -fPIC |
175 |
|
176 |
# https://bugs.gentoo.org/show_bug.cgi?id=50309 |
177 |
if is-flagq -O3; then |
178 |
is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
179 |
use hardened && replace-flags -O3 -O2 |
180 |
fi |
181 |
|
182 |
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
183 |
tc-export CXX |
184 |
# The configure script fails to use pkg-config correctly. |
185 |
# http://bugs.python.org/issue15506 |
186 |
export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
187 |
|
188 |
# Set LDFLAGS so we link modules with -lpython3.2 correctly. |
189 |
# Needed on FreeBSD unless Python 3.2 is already installed. |
190 |
# Please query BSD team before removing this! |
191 |
append-ldflags "-L." |
192 |
|
193 |
local dbmliborder |
194 |
if use gdbm; then |
195 |
dbmliborder+="${dbmliborder:+:}gdbm" |
196 |
fi |
197 |
|
198 |
BUILD_DIR="${WORKDIR}/${CHOST}" |
199 |
mkdir -p "${BUILD_DIR}" || die |
200 |
cd "${BUILD_DIR}" || die |
201 |
|
202 |
ECONF_SOURCE="${S}" OPT="" \ |
203 |
econf \ |
204 |
--with-fpectl \ |
205 |
--enable-shared \ |
206 |
$(use_enable ipv6) \ |
207 |
$(use_with threads) \ |
208 |
--infodir='${prefix}/share/info' \ |
209 |
--mandir='${prefix}/share/man' \ |
210 |
--with-computed-gotos \ |
211 |
--with-dbmliborder="${dbmliborder}" \ |
212 |
--with-libc="" \ |
213 |
--enable-loadable-sqlite-extensions \ |
214 |
--with-system-expat \ |
215 |
--with-system-ffi |
216 |
} |
217 |
|
218 |
src_compile() { |
219 |
# Avoid invoking pgen for cross-compiles. |
220 |
touch Include/graminit.h Python/graminit.c || die |
221 |
|
222 |
cd "${BUILD_DIR}" || die |
223 |
emake CPPFLAGS="" CFLAGS="" LDFLAGS="" || die "emake failed" |
224 |
|
225 |
# Work around bug 329499. See also bug 413751 and 457194. |
226 |
if has_version dev-libs/libffi[pax_kernel]; then |
227 |
pax-mark E python |
228 |
else |
229 |
pax-mark m python |
230 |
fi |
231 |
} |
232 |
|
233 |
src_test() { |
234 |
# Tests will not work when cross compiling. |
235 |
if tc-is-cross-compiler; then |
236 |
elog "Disabling tests due to crosscompiling." |
237 |
return |
238 |
fi |
239 |
|
240 |
cd "${BUILD_DIR}" || die |
241 |
|
242 |
# Skip failing tests. |
243 |
local skipped_tests="gdb" |
244 |
|
245 |
for test in ${skipped_tests}; do |
246 |
mv "${S}"/Lib/test/test_${test}.py "${T}" |
247 |
done |
248 |
|
249 |
PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-u -network" FLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty |
250 |
local result="$?" |
251 |
|
252 |
for test in ${skipped_tests}; do |
253 |
mv "${T}/test_${test}.py" "${S}"/Lib/test |
254 |
done |
255 |
|
256 |
elog "The following tests have been skipped:" |
257 |
for test in ${skipped_tests}; do |
258 |
elog "test_${test}.py" |
259 |
done |
260 |
|
261 |
elog "If you would like to run them, you may:" |
262 |
elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" |
263 |
elog "and run the tests separately." |
264 |
|
265 |
if [[ "${result}" -ne 0 ]]; then |
266 |
die "emake test failed" |
267 |
fi |
268 |
} |
269 |
|
270 |
src_install() { |
271 |
local libdir=${ED}/usr/$(get_libdir)/python${SLOT} |
272 |
|
273 |
cd "${BUILD_DIR}" || die |
274 |
|
275 |
emake DESTDIR="${D}" altinstall || die "emake altinstall failed" |
276 |
|
277 |
sed \ |
278 |
-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
279 |
-e "s/\(PY_LDFLAGS=\).*/\1/" \ |
280 |
-i "${libdir}/config-${SLOT}/Makefile" || die "sed failed" |
281 |
|
282 |
# Backwards compat with Gentoo divergence. |
283 |
dosym python${SLOT}-config /usr/bin/python-config-${SLOT} || die |
284 |
|
285 |
# Fix collisions between different slots of Python. |
286 |
rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
287 |
|
288 |
if use build; then |
289 |
rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter} |
290 |
else |
291 |
use elibc_uclibc && rm -fr "${libdir}/test" |
292 |
use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} |
293 |
use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*} |
294 |
fi |
295 |
|
296 |
use threads || rm -fr "${libdir}/multiprocessing" |
297 |
use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe |
298 |
|
299 |
dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} || die "dodoc failed" |
300 |
|
301 |
if use examples; then |
302 |
insinto /usr/share/doc/${PF}/examples |
303 |
find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
304 |
doins -r "${S}"/Tools || die "doins failed" |
305 |
fi |
306 |
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
307 |
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
308 |
emake --no-print-directory -s -f - 2>/dev/null) |
309 |
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
310 |
|
311 |
newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} || die "newconfd failed" |
312 |
newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} || die "newinitd failed" |
313 |
sed \ |
314 |
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ |
315 |
-e "s:@PYDOC@:pydoc${SLOT}:" \ |
316 |
-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" |
317 |
|
318 |
# for python-exec |
319 |
python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR |
320 |
|
321 |
# if not using a cross-compiler, use the fresh binary |
322 |
if ! tc-is-cross-compiler; then |
323 |
local PYTHON=./python |
324 |
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. |
325 |
fi |
326 |
|
327 |
echo "EPYTHON='${EPYTHON}'" > epython.py |
328 |
python_domodule epython.py |
329 |
} |
330 |
|
331 |
pkg_preinst() { |
332 |
if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then |
333 |
python_updater_warning="1" |
334 |
fi |
335 |
} |
336 |
|
337 |
eselect_python_update() { |
338 |
if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
339 |
eselect python update |
340 |
fi |
341 |
|
342 |
if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
343 |
eselect python update --python${PV%%.*} |
344 |
fi |
345 |
} |
346 |
|
347 |
pkg_postinst() { |
348 |
eselect_python_update |
349 |
|
350 |
if [[ "${python_updater_warning}" == "1" ]]; then |
351 |
ewarn "You have just upgraded from an older version of Python." |
352 |
ewarn "You should switch active version of Python ${PV%%.*} and run" |
353 |
ewarn "'python-updater [options]' to rebuild Python modules." |
354 |
fi |
355 |
} |
356 |
|
357 |
pkg_postrm() { |
358 |
eselect_python_update |
359 |
} |