Openembedded Core Discussions
 help / color / mirror / Atom feed
From: ChenQi <Qi.Chen@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [RFC PATCH] package.bbclass: omit .pyc and .pyo file
Date: Wed, 7 Jan 2015 10:07:38 +0800	[thread overview]
Message-ID: <54AC94EA.6020005@windriver.com> (raw)
In-Reply-To: <1420592855-20473-1-git-send-email-liezhi.yang@windriver.com>

On 01/07/2015 09:07 AM, Robert Yang wrote:
> We should not ship .pyc or .pyo file, but there are a few packages
> ship .pyc, should we:
> 1) Ignore them in package.bbclass as this patch showes ?
> Or
> 2) Add a qa check  then fix it by hand one by one ?

3) Fix it in a bbclass that python related recipes would generally inherit.

Regards,
Chen Qi

> Here is the list of oe-core's world build:
> python-smartpm-1.4.1
> nativesdk-python-smartpm-1.4.1
> python3-distribute-0.6.32
> python-pycurl-7.19.5
> python-pyrex-0.9.9
> python-numpy-1.7.0
> python-distribute-0.6.32
> python-async-0.6.1
> python-docutils-0.12
> python-pycairo-1.10.0
> python-scons-2.3.2
> python-imaging-1.1.7
> python-gitdb-0.5.4
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>   meta/classes/package.bbclass |    6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index fc501fc..6960221 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1022,6 +1022,9 @@ python populate_packages () {
>               files.append(file)
>   
>           for file in files:
> +            # Skip .pyc and .pyo file.
> +            if file.endswith('.pyc') or file.endswith('.pyo'):
> +                continue
>               if not cpath.islink(file):
>                   if cpath.isdir(file):
>                       newfiles =  [ os.path.join(file,x) for x in os.listdir(file) ]
> @@ -1083,6 +1086,9 @@ python populate_packages () {
>           if not dir:
>               dir = os.sep
>           for f in (files + dirs):
> +            # Skip .pyc and .pyo file.
> +            if f.endswith('.pyc') or f.endswith('.pyo'):
> +                continue
>               path = os.path.join(dir, f)
>               if ('.' + path) not in seen:
>                   unshipped.append(path)



  reply	other threads:[~2015-01-07  2:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-07  1:07 [RFC PATCH] package.bbclass: omit .pyc and .pyo file Robert Yang
2015-01-07  2:07 ` ChenQi [this message]
2015-01-07  8:07 ` Richard Purdie
2015-01-07  9:23   ` Mike Looijmans
2015-01-07  9:32     ` Robert Yang
2015-01-07 10:04       ` Richard Purdie
2015-01-07 11:16     ` Burton, Ross
2015-01-07 12:49       ` Mike Looijmans

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=54AC94EA.6020005@windriver.com \
    --to=qi.chen@windriver.com \
    --cc=openembedded-core@lists.openembedded.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