From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-python+bounces-410-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 74C75198005
	for <garchives@archives.gentoo.org>; Mon, 25 Feb 2013 08:31:40 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id F0F98E07EC;
	Mon, 25 Feb 2013 08:31:39 +0000 (UTC)
Received: from icp-osb-irony-out5.external.iinet.net.au (icp-osb-irony-out5.external.iinet.net.au [203.59.1.221])
	by pigeon.gentoo.org (Postfix) with ESMTP id 80A4AE07EC
	for <gentoo-python@lists.gentoo.org>; Mon, 25 Feb 2013 08:31:38 +0000 (UTC)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AgEFAPQgK1F8lHxy/2dsb2JhbABFhk+7BIEEFnOCHwEBBAEjWwsLDQ0CBSECAg8QOBkah3MFrAaRSIEjjXIWgheBEwOIZ4RpiGyGGYpNgVKBQg
X-IronPort-AV: E=Sophos;i="4.84,733,1355068800"; 
   d="scan'208";a="99750043"
Received: from unknown (HELO archtester.homenetwork) ([124.148.124.114])
  by icp-osb-irony-out5.iinet.net.au with ESMTP; 25 Feb 2013 16:31:35 +0800
Date: Mon, 25 Feb 2013 16:31:35 +0800
From: IAN DELANEY <della5@iinet.com.au>
To: gentoo-python@lists.gentoo.org
Subject: Re: [gentoo-python] [PATCH distutils-r1] Support EXAMPLES for
 installing examples.
Message-ID: <20130225163135.6bc19aa3@archtester.homenetwork>
In-Reply-To: <1360972573-21766-1-git-send-email-mgorny@gentoo.org>
References: <1360972573-21766-1-git-send-email-mgorny@gentoo.org>
Organization: homenetwork
X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.13; x86_64-pc-linux-gnu)
Precedence: bulk
List-Post: <mailto:gentoo-python@lists.gentoo.org>
List-Help: <mailto:gentoo-python+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-python+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-python+subscribe@lists.gentoo.org>
List-Id: Discussions centering around the Python ecosystem in Gentoo Linux <gentoo-python.gentoo.org>
X-BeenThere: gentoo-python@gentoo.org
X-BeenThere: gentoo-python@lists.gentoo.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 89a12f7b-35b6-4a3a-90ff-bbe709ab3b52
X-Archives-Hash: 3ea51b5d626a02cbb08e943a4202c05f

On Sat, 16 Feb 2013 00:56:13 +0100
Micha=C5=82 G=C3=B3rny <mgorny@gentoo.org> wrote:

> A lot of ebuilds is installing examples manually. In EAPI 4+ this
> additionally requires calling 'docompress' to disable compressing
> them.
>=20
> 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(-)
>=20
> diff --git a/gx86/eclass/distutils-r1.eclass
> b/gx86/eclass/distutils-r1.eclass 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
> =20
>  # @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
> =20
>  	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
>  }
> =20

yes good idea

--=20
kind regards

Ian Delaney