1 |
floppym 14/03/28 01:35:31 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: python-3.3.5.ebuild |
5 |
Log: |
6 |
Version bump. |
7 |
|
8 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.751 dev-lang/python/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.751&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.751&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?r1=1.750&r2=1.751 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v |
20 |
retrieving revision 1.750 |
21 |
retrieving revision 1.751 |
22 |
diff -u -r1.750 -r1.751 |
23 |
--- ChangeLog 20 Mar 2014 14:13:55 -0000 1.750 |
24 |
+++ ChangeLog 28 Mar 2014 01:35:30 -0000 1.751 |
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.750 2014/03/20 14:13:55 jer Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.751 2014/03/28 01:35:30 floppym Exp $ |
30 |
+ |
31 |
+*python-3.3.5 (28 Mar 2014) |
32 |
+ |
33 |
+ 28 Mar 2014; Mike Gilbert <floppym@g.o> +python-3.3.5.ebuild: |
34 |
+ Version bump. |
35 |
|
36 |
20 Mar 2014; Jeroen Roovers <jer@g.o> python-2.7.6.ebuild: |
37 |
Stable for HPPA (bug #504742). |
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-lang/python/python-3.3.5.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.3.5.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.3.5.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: python-3.3.5.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-3.3.5.ebuild,v 1.1 2014/03/28 01:35:30 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_VERSION="${PV}-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 |
mirror://gentoo/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz" |
66 |
|
67 |
LICENSE="PSF-2" |
68 |
SLOT="3.3" |
69 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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="*_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 |
if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then |
218 |
eerror "configure has detected that the sem_open function is broken." |
219 |
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777." |
220 |
die "Broken sem_open function (bug 496328)" |
221 |
fi |
222 |
} |
223 |
|
224 |
src_compile() { |
225 |
# Avoid invoking pgen for cross-compiles. |
226 |
touch Include/graminit.h Python/graminit.c || die |
227 |
|
228 |
cd "${BUILD_DIR}" || die |
229 |
emake CPPFLAGS="" CFLAGS="" LDFLAGS="" |
230 |
|
231 |
# Work around bug 329499. See also bug 413751 and 457194. |
232 |
if has_version dev-libs/libffi[pax_kernel]; then |
233 |
pax-mark E python |
234 |
else |
235 |
pax-mark m python |
236 |
fi |
237 |
} |
238 |
|
239 |
src_test() { |
240 |
# Tests will not work when cross compiling. |
241 |
if tc-is-cross-compiler; then |
242 |
elog "Disabling tests due to crosscompiling." |
243 |
return |
244 |
fi |
245 |
|
246 |
cd "${BUILD_DIR}" || die |
247 |
|
248 |
# Skip failing tests. |
249 |
local skipped_tests="gdb" |
250 |
|
251 |
for test in ${skipped_tests}; do |
252 |
mv "${S}"/Lib/test/test_${test}.py "${T}" |
253 |
done |
254 |
|
255 |
PYTHONDONTWRITEBYTECODE="" emake test EXTRATESTOPTS="-u -network" FLAGS="" CFLAGS="" LDFLAGS="" < /dev/tty |
256 |
local result="$?" |
257 |
|
258 |
for test in ${skipped_tests}; do |
259 |
mv "${T}/test_${test}.py" "${S}"/Lib/test |
260 |
done |
261 |
|
262 |
elog "The following tests have been skipped:" |
263 |
for test in ${skipped_tests}; do |
264 |
elog "test_${test}.py" |
265 |
done |
266 |
|
267 |
elog "If you would like to run them, you may:" |
268 |
elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" |
269 |
elog "and run the tests separately." |
270 |
|
271 |
if [[ "${result}" -ne 0 ]]; then |
272 |
die "emake test failed" |
273 |
fi |
274 |
} |
275 |
|
276 |
src_install() { |
277 |
local libdir=${ED}/usr/$(get_libdir)/python${SLOT} |
278 |
|
279 |
cd "${BUILD_DIR}" || die |
280 |
|
281 |
emake DESTDIR="${D}" altinstall |
282 |
|
283 |
sed \ |
284 |
-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
285 |
-e "s/\(PY_LDFLAGS=\).*/\1/" \ |
286 |
-i "${libdir}/config-${SLOT}/Makefile" || die "sed failed" |
287 |
|
288 |
# Backwards compat with Gentoo divergence. |
289 |
dosym python${SLOT}-config /usr/bin/python-config-${SLOT} |
290 |
|
291 |
# Fix collisions between different slots of Python. |
292 |
rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
293 |
|
294 |
if use build; then |
295 |
rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter} |
296 |
else |
297 |
use elibc_uclibc && rm -fr "${libdir}/test" |
298 |
use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} |
299 |
use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*} |
300 |
fi |
301 |
|
302 |
use threads || rm -fr "${libdir}/multiprocessing" |
303 |
use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe |
304 |
|
305 |
dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
306 |
|
307 |
if use examples; then |
308 |
insinto /usr/share/doc/${PF}/examples |
309 |
find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
310 |
doins -r "${S}"/Tools |
311 |
fi |
312 |
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
313 |
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
314 |
emake --no-print-directory -s -f - 2>/dev/null) |
315 |
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
316 |
|
317 |
newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} |
318 |
newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} |
319 |
sed \ |
320 |
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ |
321 |
-e "s:@PYDOC@:pydoc${SLOT}:" \ |
322 |
-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" |
323 |
|
324 |
# for python-exec |
325 |
python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR |
326 |
|
327 |
# if not using a cross-compiler, use the fresh binary |
328 |
if ! tc-is-cross-compiler; then |
329 |
local PYTHON=./python |
330 |
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. |
331 |
fi |
332 |
|
333 |
echo "EPYTHON='${EPYTHON}'" > epython.py |
334 |
python_domodule epython.py |
335 |
} |
336 |
|
337 |
pkg_preinst() { |
338 |
if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then |
339 |
python_updater_warning="1" |
340 |
fi |
341 |
} |
342 |
|
343 |
eselect_python_update() { |
344 |
if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
345 |
eselect python update |
346 |
fi |
347 |
|
348 |
if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
349 |
eselect python update --python${PV%%.*} |
350 |
fi |
351 |
} |
352 |
|
353 |
pkg_postinst() { |
354 |
eselect_python_update |
355 |
|
356 |
if [[ "${python_updater_warning}" == "1" ]]; then |
357 |
ewarn "You have just upgraded from an older version of Python." |
358 |
ewarn |
359 |
ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
360 |
ewarn |
361 |
ewarn "For legacy packages, you should switch active version of Python and run 'python-updater [options]' to rebuild Python modules." |
362 |
fi |
363 |
} |
364 |
|
365 |
pkg_postrm() { |
366 |
eselect_python_update |
367 |
} |