public inbox for gentoo-python@lists.gentoo.org
 help / color / mirror / Atom feed
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.
Date: Mon, 25 Feb 2013 16:31:35 +0800	[thread overview]
Message-ID: <20130225163135.6bc19aa3@archtester.homenetwork> (raw)
In-Reply-To: <1360972573-21766-1-git-send-email-mgorny@gentoo.org>

On Sat, 16 Feb 2013 00:56:13 +0100
Michał Górny <mgorny@gentoo.org> 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.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=( doc/html/ )
> +# HTML_DOCS=( 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=( 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 == 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=examples
> +		dodoc -r "${EXAMPLES[@]}"
> +
> +		docompress -x /usr/share/doc/${PF}/examples
>  	fi
>  }
>  

yes good idea

-- 
kind regards

Ian Delaney


      parent reply	other threads:[~2013-02-25  8:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 23:56 [gentoo-python] [PATCH distutils-r1] Support EXAMPLES for installing examples Michał Górny
2013-02-21 22:21 ` [gentoo-python] " Mike Gilbert
2013-02-25  8:31 ` IAN DELANEY [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130225163135.6bc19aa3@archtester.homenetwork \
    --to=della5@iinet.com.au \
    --cc=gentoo-python@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox