Openembedded Core Discussions
 help / color / mirror / Atom feed
* [RFC PATCH] package.bbclass: omit .pyc and .pyo file
@ 2015-01-07  1:07 Robert Yang
  2015-01-07  2:07 ` ChenQi
  2015-01-07  8:07 ` Richard Purdie
  0 siblings, 2 replies; 8+ messages in thread
From: Robert Yang @ 2015-01-07  1:07 UTC (permalink / raw)
  To: openembedded-core

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 ?

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)
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-01-07 12:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07  1:07 [RFC PATCH] package.bbclass: omit .pyc and .pyo file Robert Yang
2015-01-07  2:07 ` ChenQi
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox