commit:     c276f3d9eb530c6527889b1ec83ccff428815f6b
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 19 16:49:57 2017 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Feb 19 17:10:06 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c276f3d9

dev-lang/python: bump to 2.7.13

Package-Manager: Portage-2.3.3_p56, Repoman-2.3.1_p49

 dev-lang/python/Manifest             |   2 +
 dev-lang/python/python-2.7.13.ebuild | 361 +++++++++++++++++++++++++++++++++++
 2 files changed, 363 insertions(+)

diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 44b8f560c3..7e6d94ef88 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -1,8 +1,10 @@
 DIST Python-2.7.12.tar.xz 12390820 SHA256 
d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978 SHA512 
6ddbbce47cc49597433d98ca05c2f62f07ed1070807b645602a8e9e9b996adc6fa66fa20a33cd7d23d4e7e925e25071d7301d288149fbe4e8c5f06d5438dda1f
 WHIRLPOOL 
fe4224f4c3dc8dc5c49005051da0069922c86f39880a0072c09fac422e1913d924ac695e22be11603a961329dd8c17b1cf7696b31b62ef93398e42745a6446d6
+DIST Python-2.7.13.tar.xz 12495628 SHA256 
35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731 SHA512 
f37c9a28ce129d01e63c84d7db627a06402854578f62d17927334ea21ede318e04bbf66e890e3f47c85333e6b19f6e5581fb3f3e27efd24be27017d1b6529c4b
 WHIRLPOOL 
6bb6ad867c856bcaea97d5ad85882d990f5c8169a2450685cb77645f674bead83970c67a6a689ce0807856e366f320a0230250d2239f005f2a64cc32505507a5
 DIST Python-3.4.5.tar.xz 14516820 SHA256 
ee64b1c8a47461009abf25252332d29a4e587cb4f0c1c96aa793a3732e9d898a SHA512 
b548a5338d141b3086dea372fa2cc245ba5350ee9f0d1304ef6222dc45380b66d380b092e547d54206d56ca68563b95036f445f97f72bb0ef1d48f81a74a3d4c
 WHIRLPOOL 
43e0aed0177d46148964447b4fb24475c4c736afb2ba84ec393fbf55db3da3f192308f9c8f236deaa7a608dac56946ee7755970fadaa82bf406c910a05f36883
 DIST Python-3.5.2.tar.xz 15222676 SHA256 
0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40 SHA512 
c07c3366f1c81e214241444bb9da6db9d11da32ad66bfa29cdad5a3b2e34e4d870bda6d4ce3c3910b582942e91f1d8c8a1c1a7b9464cc147b83c9e0007012742
 WHIRLPOOL 
cf55d67f362b6a7529d43bb5aa8014c8349be190c6d4dae9d48de1679ab8623087478f41686cdced981cf18bb3d107052732cd437ff31ba5de2cc06b04ec2289
 DIST Python-3.6.0.tar.xz 16805836 SHA256 
b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622 SHA512 
9d06bee9172bc0bfd2d280fd1c27ea712f3258cfbfd2e2aeb734d0a6710998d5deeefc5d6e72251750dd9493d35461511ceaa187a29dea700ca238ff6ac1dbb2
 WHIRLPOOL 
4fbe3b971ff6fca4349c74ca07ade0406ae70e0d201cb7689e95744a6f39d1bcc010eb426f4e02aa8f692828aa996aa5c7656b8031503b342b9b4a42beeb7827
 DIST python-gentoo-patches-2.7.12-0.tar.xz 13576 SHA256 
cd842eec7202df57c153adc1fbb81e70b26ef651f8e9346e065d8577b93f343b SHA512 
8bf530fca15c47fa5d9bc958e433b35943a12c98e4172806a45aa60dc85ec92f8ab6ffcd90f752dc5bf8ffc711414894c15820c4b6ef72dbcedc2808119fb1f6
 WHIRLPOOL 
54b8ca6a4371d460dadccfdffcc096c12930d58714eef95117a658d7a1337ea89c45c69553b5b993017211faaa0f8d670e09a8452e53c0fb176be3e908524ee6
+DIST python-gentoo-patches-2.7.13-0.tar.xz 13292 SHA256 
271835eb36125d09cc5e904ef23a5263acd8e5f513202a8d4f8a9a0f64fc80a8 SHA512 
d70f6baba1a465a752c515e33dfdee2a5cc75400fadfb8ea0bd1e82d50089abdf02d7726c697850dc47de2054aa494bbdc08de2673c260b54e609f29dab259ad
 WHIRLPOOL 
6a6d8b099fa814839bf5b3455b3889205c649ef522b35c3a501831d63d0e916d7747b83ac9b8991f8f8c34b328478d84cf7a12a32161ce0fec37204f9c019e2d
 DIST python-gentoo-patches-3.4.5-0.tar.xz 12044 SHA256 
84ee7630670a1dac4bbbc55fabf5f99b5b29007de4f140ad956e93d2e7aba8fa SHA512 
108a4845667ecdf4001fcbeffab0cfbbac87439a449a7351428b0f3e2f159e3848ee0c0dfa45c9fba893b9f9584b33722fc8bb0bd7485a1d0909c3a35ede6ed8
 WHIRLPOOL 
f0248faa0b4ce5679e37381bba90f8a4d361a49db792787bffc06a54a4bc82fea4d53255120f10e6dbf51b99e12417fc1b469be9624e73508fa3a212a38e7352
 DIST python-gentoo-patches-3.5.2-0.tar.xz 12008 SHA256 
eb898fb448bd40f086ae2910e94c608faa932eb377fe40bd34f4390b4c37aac1 SHA512 
e2ef1b8f10f9ea849bf52a0be65d48f7cfecf07bdf151cbbd7e3a1c9428a8d96e901650496c4ae7fd0093af8cc90de8df674dc1a4c66ad21916a4ee45a81efc8
 WHIRLPOOL 
66b99c7c50e3eaca783f773349b3e8a357f706a7da6a66bd2e0a53946bc81d965ac99d8fd4c50ba7e42052aa84508c8aede5eacedbb95f040a48cf1a5de6b6b0
 DIST python-gentoo-patches-3.6.0-0.tar.xz 10680 SHA256 
ecf78d292f2fef1116b41c3884f492d41ea716a14f0a21755ba2f8d76aefe1a7 SHA512 
f340643cf338c693ce315fab705ba888040a2989b0887686d43886319419245c24bb46ebb71cea422644f1f3beaf64289b773e72db3377187bf11a83f9313a90
 WHIRLPOOL 
4a4d12ea0dbb03b5d2730db40b5aebe4c1c937cfe63341c775431dc06a3b60552b9390fdf9b7fff5e50024a93d11b269ef80a95afcf308327943f7003dd4c379

diff --git a/dev-lang/python/python-2.7.13.ebuild 
b/dev-lang/python/python-2.7.13.ebuild
new file mode 100644
index 0000000000..0e5cd3b1c2
--- /dev/null
+++ b/dev-lang/python/python-2.7.13.ebuild
@@ -0,0 +1,361 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 
toolchain-funcs multiprocessing
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="2.7.13-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="http://www.python.org/";
+SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+       
https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz";
+
+LICENSE="PSF-2"
+SLOT="2.7"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl 
+ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="app-arch/bzip2:0=
+       >=sys-libs/zlib-1.1.3:0=
+       virtual/libffi
+       virtual/libintl
+       berkdb? ( || (
+               sys-libs/db:5.3
+               sys-libs/db:5.2
+               sys-libs/db:5.1
+               sys-libs/db:5.0
+               sys-libs/db:4.8
+               sys-libs/db:4.7
+               sys-libs/db:4.6
+               sys-libs/db:4.5
+               sys-libs/db:4.4
+               sys-libs/db:4.3
+               sys-libs/db:4.2
+       ) )
+       gdbm? ( sys-libs/gdbm:0=[berkdb] )
+       ncurses? (
+               >=sys-libs/ncurses-5.2:0=
+               readline? ( >=sys-libs/readline-4.1:0= )
+       )
+       sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+       ssl? (
+               !libressl? ( dev-libs/openssl:0= )
+               libressl? ( dev-libs/libressl:= )
+       )
+       tk? (
+               >=dev-lang/tcl-8.0:0=
+               >=dev-lang/tk-8.0:0=
+               dev-tcltk/blt:0=
+               dev-tcltk/tix
+       )
+       xml? ( >=dev-libs/expat-2.1 )
+       !!<sys-apps/portage-2.1.9"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig
+       >=sys-devel/autoconf-2.65
+       !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )
+       doc? ( dev-python/python-docs:${SLOT} )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+       if use berkdb; then
+               ewarn "'bsddb' module is out-of-date and no longer maintained 
inside"
+               ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been 
additionally"
+               ewarn "removed in Python 3. A maintained alternative of 
'bsddb3' module"
+               ewarn "is provided by dev-python/bsddb3."
+       else
+               if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
+                       ewarn "You are migrating from 
=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
+                       ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
+                       ewarn "You might need to migrate your databases."
+               fi
+       fi
+}
+
+src_prepare() {
+       # Ensure that internal copies of expat, libffi and zlib are not used.
+       rm -r Modules/expat || die
+       rm -r Modules/_ctypes/libffi* || die
+       rm -r Modules/zlib || die
+
+       if tc-is-cross-compiler; then
+               local 
EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
+       fi
+
+       EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+
+       # Fix for cross-compiling.
+       epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
+       epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch"
+       epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
+       epatch "${FILESDIR}/python-2.7.10-system-libffi.patch"
+
+       epatch_user
+
+       sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+               Lib/distutils/command/install.py \
+               Lib/distutils/sysconfig.py \
+               Lib/site.py \
+               Lib/sysconfig.py \
+               Lib/test/test_site.py \
+               Makefile.pre.in \
+               Modules/Setup.dist \
+               Modules/getpath.c \
+               setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+       eautoreconf
+}
+
+src_configure() {
+               # dbm module can be linked against berkdb or gdbm.
+               # Defaults to gdbm when both are enabled, #204343.
+               local disable
+               use berkdb   || use gdbm || disable+=" dbm"
+               use berkdb   || disable+=" _bsddb"
+               use gdbm     || disable+=" gdbm"
+               use ncurses  || disable+=" _curses _curses_panel"
+               use readline || disable+=" readline"
+               use sqlite   || disable+=" _sqlite3"
+               use ssl      || export PYTHON_DISABLE_SSL="1"
+               use tk       || disable+=" _tkinter"
+               use xml      || disable+=" _elementtree pyexpat" # _elementtree 
uses pyexpat.
+               export PYTHON_DISABLE_MODULES="${disable}"
+
+               if ! use xml; then
+                       ewarn "You have configured Python without XML support."
+                       ewarn "This is NOT a recommended configuration as you"
+                       ewarn "may face problems parsing any XML documents."
+               fi
+
+       if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+               einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+       fi
+
+       if [[ "$(gcc-major-version)" -ge 4 ]]; then
+               append-flags -fwrapv
+       fi
+
+       filter-flags -malign-double
+
+       # https://bugs.gentoo.org/show_bug.cgi?id=50309
+       if is-flagq -O3; then
+               is-flagq -fstack-protector-all && replace-flags -O3 -O2
+               use hardened && replace-flags -O3 -O2
+       fi
+
+       if tc-is-cross-compiler; then
+               # Force some tests that try to poke fs paths.
+               export ac_cv_file__dev_ptc=no
+               export ac_cv_file__dev_ptmx=yes
+       fi
+
+       # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
+       tc-export CXX
+       # The configure script fails to use pkg-config correctly.
+       # http://bugs.python.org/issue15506
+       export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
+
+       # Set LDFLAGS so we link modules with -lpython2.7 correctly.
+       # Needed on FreeBSD unless Python 2.7 is already installed.
+       # Please query BSD team before removing this!
+       append-ldflags "-L."
+
+       local dbmliborder
+       if use gdbm; then
+               dbmliborder+="${dbmliborder:+:}gdbm"
+       fi
+       if use berkdb; then
+               dbmliborder+="${dbmliborder:+:}bdb"
+       fi
+
+       BUILD_DIR="${WORKDIR}/${CHOST}"
+       mkdir -p "${BUILD_DIR}" || die
+       cd "${BUILD_DIR}" || die
+
+       ECONF_SOURCE="${S}" OPT="" \
+       econf \
+               --with-fpectl \
+               --enable-shared \
+               $(use_enable ipv6) \
+               $(use_with threads) \
+               $(use wide-unicode && echo "--enable-unicode=ucs4" || echo 
"--enable-unicode=ucs2") \
+               --infodir='${prefix}/share/info' \
+               --mandir='${prefix}/share/man' \
+               --with-computed-gotos \
+               --with-dbmliborder="${dbmliborder}" \
+               --with-libc="" \
+               --enable-loadable-sqlite-extensions \
+               --with-system-expat \
+               --with-system-ffi \
+               --without-ensurepip
+
+       if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" 
pyconfig.h; then
+               eerror "configure has detected that the sem_open function is 
broken."
+               eerror "Please ensure that /dev/shm is mounted as a tmpfs with 
mode 1777."
+               die "Broken sem_open function (bug 496328)"
+       fi
+}
+
+src_compile() {
+       # Avoid invoking pgen for cross-compiles.
+       touch Include/graminit.h Python/graminit.c
+
+       cd "${BUILD_DIR}" || die
+       emake
+
+       # Work around bug 329499. See also bug 413751 and 457194.
+       if has_version dev-libs/libffi[pax_kernel]; then
+               pax-mark E python
+       else
+               pax-mark m python
+       fi
+}
+
+src_test() {
+       # Tests will not work when cross compiling.
+       if tc-is-cross-compiler; then
+               elog "Disabling tests due to crosscompiling."
+               return
+       fi
+
+       cd "${BUILD_DIR}" || die
+
+       # Skip failing tests.
+       local skipped_tests="distutils gdb"
+
+       for test in ${skipped_tests}; do
+               mv "${S}"/Lib/test/test_${test}.py "${T}"
+       done
+
+       # Rerun failed tests in verbose mode (regrtest -w).
+       emake test EXTRATESTOPTS="-w" < /dev/tty
+       local result="$?"
+
+       for test in ${skipped_tests}; do
+               mv "${T}/test_${test}.py" "${S}"/Lib/test
+       done
+
+       elog "The following tests have been skipped:"
+       for test in ${skipped_tests}; do
+               elog "test_${test}.py"
+       done
+
+       elog "If you would like to run them, you may:"
+       elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
+       elog "and run the tests separately."
+
+       if [[ "${result}" -ne 0 ]]; then
+               die "emake test failed"
+       fi
+}
+
+src_install() {
+       local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
+
+       cd "${BUILD_DIR}" || die
+       emake DESTDIR="${D}" altinstall
+
+       sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die 
"sed failed"
+
+       # Fix collisions between different slots of Python.
+       mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}"
+       mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}"
+       mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}"
+       rm -f "${ED}usr/bin/smtpd.py"
+
+               use berkdb || rm -r 
"${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die
+               use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || 
die
+               use tk || rm -r "${ED}usr/bin/idle${SLOT}" 
"${libdir}/"{idlelib,lib-tk} || die
+               use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
+
+       use threads || rm -r "${libdir}/multiprocessing" || die
+       use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die
+
+       dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
+
+       if use examples; then
+               insinto /usr/share/doc/${PF}/examples
+               doins -r "${S}"/Tools
+       fi
+       insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+       local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' 
| \
+               emake --no-print-directory -s -f - 2>/dev/null)
+       newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
+
+       newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT}
+       newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT}
+       sed \
+               -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
+               -e "s:@PYDOC@:pydoc${SLOT}:" \
+               -i "${ED}etc/conf.d/pydoc-${SLOT}" 
"${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
+
+       # for python-exec
+       local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
+
+       # if not using a cross-compiler, use the fresh binary
+       if ! tc-is-cross-compiler; then
+               local -x PYTHON=./python
+               local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+       else
+               vars=( PYTHON "${vars[@]}" )
+       fi
+
+       python_export "python${SLOT}" "${vars[@]}"
+       echo "EPYTHON='${EPYTHON}'" > epython.py || die
+       python_domodule epython.py
+
+       # python-exec wrapping support
+       local pymajor=${SLOT%.*}
+       mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+       # python and pythonX
+       ln -s "../../../bin/python${SLOT}" \
+               "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+       ln -s "python${pymajor}" \
+               "${D}${PYTHON_SCRIPTDIR}/python" || die
+       # python-config and pythonX-config
+       ln -s "../../../bin/python${SLOT}-config" \
+               "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+       ln -s "python${pymajor}-config" \
+               "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+       # 2to3, pydoc, pyvenv
+       ln -s "../../../bin/2to3-${SLOT}" \
+               "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+       ln -s "../../../bin/pydoc${SLOT}" \
+               "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+       # idle
+       if use tk; then
+               ln -s "../../../bin/idle${SLOT}" \
+                       "${D}${PYTHON_SCRIPTDIR}/idle" || die
+       fi
+}
+
+eselect_python_update() {
+       if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect 
python show)" ]]; then
+               eselect python update
+       fi
+
+       if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f 
"${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+               eselect python update --python${PV%%.*}
+       fi
+}
+
+pkg_postinst() {
+       eselect_python_update
+}
+
+pkg_postrm() {
+       eselect_python_update
+}

Reply via email to