1 |
floppym 14/03/28 01:45:34 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: python-3.4.0.ebuild |
5 |
Log: |
6 |
Version bump. Permanently drop the 'doc' use flag. |
7 |
|
8 |
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4) |
9 |
|
10 |
Revision Changes Path |
11 |
1.752 dev-lang/python/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.752&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?rev=1.752&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/ChangeLog?r1=1.751&r2=1.752 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v |
20 |
retrieving revision 1.751 |
21 |
retrieving revision 1.752 |
22 |
diff -u -r1.751 -r1.752 |
23 |
--- ChangeLog 28 Mar 2014 01:35:30 -0000 1.751 |
24 |
+++ ChangeLog 28 Mar 2014 01:45:34 -0000 1.752 |
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.751 2014/03/28 01:35:30 floppym Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/ChangeLog,v 1.752 2014/03/28 01:45:34 floppym Exp $ |
30 |
+ |
31 |
+*python-3.4.0 (28 Mar 2014) |
32 |
+ |
33 |
+ 28 Mar 2014; Mike Gilbert <floppym@g.o> +python-3.4.0.ebuild: |
34 |
+ Version bump. Permanently drop the 'doc' use flag. |
35 |
|
36 |
*python-3.3.5 (28 Mar 2014) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-lang/python/python-3.4.0.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.4.0.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/python/python-3.4.0.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: python-3.4.0.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.4.0.ebuild,v 1.1 2014/03/28 01:45:34 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="3.4.0-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%_rc*}/${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.4" |
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 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 |
PDEPEND="app-admin/eselect-python |
103 |
app-admin/python-updater" |
104 |
|
105 |
S="${WORKDIR}/${MY_P}" |
106 |
|
107 |
src_prepare() { |
108 |
# Ensure that internal copies of expat, libffi and zlib are not used. |
109 |
rm -fr Modules/expat |
110 |
rm -fr Modules/_ctypes/libffi* |
111 |
rm -fr Modules/zlib |
112 |
|
113 |
if tc-is-cross-compiler; then |
114 |
# Invokes BUILDPYTHON, which is built for the host arch |
115 |
local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch" |
116 |
fi |
117 |
|
118 |
EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" |
119 |
|
120 |
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \ |
121 |
Lib/distutils/command/install.py \ |
122 |
Lib/distutils/sysconfig.py \ |
123 |
Lib/site.py \ |
124 |
Lib/sysconfig.py \ |
125 |
Lib/test/test_site.py \ |
126 |
Makefile.pre.in \ |
127 |
Modules/Setup.dist \ |
128 |
Modules/getpath.c \ |
129 |
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" |
130 |
|
131 |
# Disable ABI flags. |
132 |
sed -e "s/ABIFLAGS=\"\${ABIFLAGS}.*\"/:/" -i configure.ac || die "sed failed" |
133 |
|
134 |
epatch_user |
135 |
|
136 |
eautoconf |
137 |
eautoheader |
138 |
} |
139 |
|
140 |
src_configure() { |
141 |
if use build; then |
142 |
# Disable extraneous modules with extra dependencies. |
143 |
export PYTHON_DISABLE_MODULES="gdbm _curses _curses_panel readline _sqlite3 _tkinter _elementtree pyexpat" |
144 |
export PYTHON_DISABLE_SSL="1" |
145 |
else |
146 |
local disable |
147 |
use gdbm || disable+=" gdbm" |
148 |
use ncurses || disable+=" _curses _curses_panel" |
149 |
use readline || disable+=" readline" |
150 |
use sqlite || disable+=" _sqlite3" |
151 |
use ssl || export PYTHON_DISABLE_SSL="1" |
152 |
use tk || disable+=" _tkinter" |
153 |
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat. |
154 |
export PYTHON_DISABLE_MODULES="${disable}" |
155 |
|
156 |
if ! use xml; then |
157 |
ewarn "You have configured Python without XML support." |
158 |
ewarn "This is NOT a recommended configuration as you" |
159 |
ewarn "may face problems parsing any XML documents." |
160 |
fi |
161 |
fi |
162 |
|
163 |
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then |
164 |
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}" |
165 |
fi |
166 |
|
167 |
if [[ "$(gcc-major-version)" -ge 4 ]]; then |
168 |
append-flags -fwrapv |
169 |
fi |
170 |
|
171 |
filter-flags -malign-double |
172 |
|
173 |
[[ "${ARCH}" == "alpha" ]] && append-flags -fPIC |
174 |
|
175 |
# https://bugs.gentoo.org/show_bug.cgi?id=50309 |
176 |
if is-flagq -O3; then |
177 |
is-flagq -fstack-protector-all && replace-flags -O3 -O2 |
178 |
use hardened && replace-flags -O3 -O2 |
179 |
fi |
180 |
|
181 |
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. |
182 |
tc-export CXX |
183 |
# The configure script fails to use pkg-config correctly. |
184 |
# http://bugs.python.org/issue15506 |
185 |
export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG) |
186 |
|
187 |
# Set LDFLAGS so we link modules with -lpython3.2 correctly. |
188 |
# Needed on FreeBSD unless Python 3.2 is already installed. |
189 |
# Please query BSD team before removing this! |
190 |
append-ldflags "-L." |
191 |
|
192 |
local dbmliborder |
193 |
if use gdbm; then |
194 |
dbmliborder+="${dbmliborder:+:}gdbm" |
195 |
fi |
196 |
|
197 |
BUILD_DIR="${WORKDIR}/${CHOST}" |
198 |
mkdir -p "${BUILD_DIR}" || die |
199 |
cd "${BUILD_DIR}" || die |
200 |
|
201 |
ECONF_SOURCE="${S}" OPT="" \ |
202 |
econf \ |
203 |
--with-fpectl \ |
204 |
--enable-shared \ |
205 |
$(use_enable ipv6) \ |
206 |
$(use_with threads) \ |
207 |
--infodir='${prefix}/share/info' \ |
208 |
--mandir='${prefix}/share/man' \ |
209 |
--with-computed-gotos \ |
210 |
--with-dbmliborder="${dbmliborder}" \ |
211 |
--with-libc="" \ |
212 |
--enable-loadable-sqlite-extensions \ |
213 |
--with-system-expat \ |
214 |
--with-system-ffi \ |
215 |
--without-ensurepip |
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 |
local -x PYTHONDONTWRITEBYTECODE= |
256 |
emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty |
257 |
local result=$? |
258 |
|
259 |
for test in ${skipped_tests}; do |
260 |
mv "${T}/test_${test}.py" "${S}"/Lib/test |
261 |
done |
262 |
|
263 |
elog "The following tests have been skipped:" |
264 |
for test in ${skipped_tests}; do |
265 |
elog "test_${test}.py" |
266 |
done |
267 |
|
268 |
elog "If you would like to run them, you may:" |
269 |
elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'" |
270 |
elog "and run the tests separately." |
271 |
|
272 |
if [[ ${result} -ne 0 ]]; then |
273 |
die "emake test failed" |
274 |
fi |
275 |
} |
276 |
|
277 |
src_install() { |
278 |
local libdir=${ED}/usr/$(get_libdir)/python${SLOT} |
279 |
|
280 |
cd "${BUILD_DIR}" || die |
281 |
|
282 |
emake DESTDIR="${D}" altinstall |
283 |
|
284 |
sed \ |
285 |
-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \ |
286 |
-e "s/\(PY_LDFLAGS=\).*/\1/" \ |
287 |
-i "${libdir}/config-${SLOT}/Makefile" || die "sed failed" |
288 |
|
289 |
# Backwards compat with Gentoo divergence. |
290 |
dosym python${SLOT}-config /usr/bin/python-config-${SLOT} |
291 |
|
292 |
# Fix collisions between different slots of Python. |
293 |
rm -f "${ED}usr/$(get_libdir)/libpython3.so" |
294 |
|
295 |
if use build; then |
296 |
rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,sqlite3,test,tkinter} |
297 |
else |
298 |
use elibc_uclibc && rm -fr "${libdir}/test" |
299 |
use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*} |
300 |
use tk || rm -fr "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,tkinter,test/test_tk*} |
301 |
fi |
302 |
|
303 |
use threads || rm -fr "${libdir}/multiprocessing" |
304 |
use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe |
305 |
|
306 |
dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} |
307 |
|
308 |
if use examples; then |
309 |
insinto /usr/share/doc/${PF}/examples |
310 |
find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr |
311 |
doins -r "${S}"/Tools |
312 |
fi |
313 |
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 |
314 |
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ |
315 |
emake --no-print-directory -s -f - 2>/dev/null) |
316 |
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py |
317 |
|
318 |
newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} |
319 |
newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} |
320 |
sed \ |
321 |
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ |
322 |
-e "s:@PYDOC@:pydoc${SLOT}:" \ |
323 |
-i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" |
324 |
|
325 |
# for python-exec |
326 |
python_export python${SLOT} EPYTHON PYTHON PYTHON_SITEDIR |
327 |
|
328 |
# if not using a cross-compiler, use the fresh binary |
329 |
if ! tc-is-cross-compiler; then |
330 |
local PYTHON=./python |
331 |
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. |
332 |
fi |
333 |
|
334 |
echo "EPYTHON='${EPYTHON}'" > epython.py |
335 |
python_domodule epython.py |
336 |
} |
337 |
|
338 |
pkg_preinst() { |
339 |
if has_version "<${CATEGORY}/${PN}-${SLOT}" && ! has_version ">=${CATEGORY}/${PN}-${SLOT}_alpha"; then |
340 |
python_updater_warning="1" |
341 |
fi |
342 |
} |
343 |
|
344 |
eselect_python_update() { |
345 |
if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then |
346 |
eselect python update |
347 |
fi |
348 |
|
349 |
if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then |
350 |
eselect python update --python${PV%%.*} |
351 |
fi |
352 |
} |
353 |
|
354 |
pkg_postinst() { |
355 |
eselect_python_update |
356 |
|
357 |
if [[ "${python_updater_warning}" == "1" ]]; then |
358 |
ewarn "You have just upgraded from an older version of Python." |
359 |
ewarn |
360 |
ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules." |
361 |
ewarn |
362 |
ewarn "For legacy packages, you should switch active version of Python and run 'python-updater [options]' to rebuild Python modules." |
363 |
fi |
364 |
} |
365 |
|
366 |
pkg_postrm() { |
367 |
eselect_python_update |
368 |
} |