From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 6DBEF198005 for ; Thu, 21 Feb 2013 22:21:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EA06021C03F; Thu, 21 Feb 2013 22:21:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7200021C03F for ; Thu, 21 Feb 2013 22:21:32 +0000 (UTC) Received: from mail-ia0-f182.google.com (mail-ia0-f182.google.com [209.85.210.182]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 9E45F33E0C0 for ; Thu, 21 Feb 2013 22:21:31 +0000 (UTC) Received: by mail-ia0-f182.google.com with SMTP id k38so26200iah.27 for ; Thu, 21 Feb 2013 14:21:11 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Discussions centering around the Python ecosystem in Gentoo Linux X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.42.94.8 with SMTP id z8mr11582854icm.36.1361485271066; Thu, 21 Feb 2013 14:21:11 -0800 (PST) Received: by 10.64.102.66 with HTTP; Thu, 21 Feb 2013 14:21:10 -0800 (PST) In-Reply-To: <1360972573-21766-1-git-send-email-mgorny@gentoo.org> References: <1360972573-21766-1-git-send-email-mgorny@gentoo.org> Date: Thu, 21 Feb 2013 17:21:10 -0500 Message-ID: Subject: [gentoo-python] Re: [PATCH distutils-r1] Support EXAMPLES for installing examples. From: Mike Gilbert To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= Cc: gentoo-python@lists.gentoo.org, python@gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 0342dd04-a65a-4e70-84e8-17873d3a35b6 X-Archives-Hash: d0c8a3ee0b4ccef38fa732235f59f189 On Fri, Feb 15, 2013 at 6:56 PM, Micha=C5=82 G=C3=B3rny = wrote: > A lot of ebuilds is installing examples manually. In EAPI 4+ this > additionally requires calling 'docompress' to disable compressing them. > > To make that simpler, introduce EXAMPLES aside to HTML_DOCS and DOCS. > --- > gx86/eclass/distutils-r1.eclass | 33 +++++++++++++++++++++++++++++---- > 1 file changed, 29 insertions(+), 4 deletions(-) > > diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.e= class > index e662fa2..f3f8f73 100644 > --- a/gx86/eclass/distutils-r1.eclass > +++ b/gx86/eclass/distutils-r1.eclass > @@ -151,7 +151,25 @@ fi > # > # Example: > # @CODE > -# HTML_DOCS=3D( doc/html/ ) > +# HTML_DOCS=3D( doc/html/. ) > +# @CODE > + > +# @ECLASS-VARIABLE: EXAMPLES > +# @DEFAULT_UNSET > +# @DESCRIPTION: > +# An array containing examples installed into 'examples' doc > +# subdirectory. The files and directories listed there must exist > +# in the directory from which distutils-r1_python_install_all() is run > +# (${S} by default). > +# > +# The 'examples' subdirectory will be marked not to be compressed > +# automatically. > +# > +# If unset, no examples will be installed. > +# > +# Example: > +# @CODE > +# EXAMPLES=3D( examples/. demos/. ) > # @CODE > > # @ECLASS-VARIABLE: DISTUTILS_IN_SOURCE_BUILD > @@ -487,7 +505,7 @@ distutils-r1_python_install_all() { > if declare -p DOCS &>/dev/null; then > # an empty list =3D=3D don't install anything > if [[ ${DOCS[@]} ]]; then > - dodoc -r "${DOCS[@]}" || die "dodoc failed" > + dodoc -r "${DOCS[@]}" > fi > else > local f > @@ -495,13 +513,20 @@ distutils-r1_python_install_all() { > for f in README* ChangeLog AUTHORS NEWS TODO CHANGES \ > THANKS BUGS FAQ CREDITS CHANGELOG; do > if [[ -s ${f} ]]; then > - dodoc "${f}" || die "(default) dodoc ${f}= failed" > + dodoc "${f}" > fi > done > fi > > if declare -p HTML_DOCS &>/dev/null; then > - dohtml -r "${HTML_DOCS[@]}" || die "dohtml failed" > + dohtml -r "${HTML_DOCS[@]}" > + fi > + > + if declare -p EXAMPLES &>/dev/null; then > + local DOCDESTTREE=3Dexamples > + dodoc -r "${EXAMPLES[@]}" > + > + docompress -x /usr/share/doc/${PF}/examples > fi > } > > -- > 1.8.1.2 > ok