[oe-commits] [openembedded-core] 08/18: recipetool: ignore zero-length setup.py files

git at git.openembedded.org git at git.openembedded.org
Tue Jul 2 09:07:20 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit f1441177be7f5efd21eea51ba0c9924aa9039103
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Tue Jul 2 16:23:59 2019 +1200

    recipetool: ignore zero-length setup.py files
    
    If a setup.py file exists it ought to have something in it before we
    consider the source tree to be a Python module and treating it as such.
    (A counter-example is https://www.bro.org/downloads/binpac-0.50.tar.gz -
    it's not clear why this has a zero-length setup.py in it but we should
    pay no attention to it.)
    
    Fixes [YOCTO #12923].
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/lib/recipetool/create_buildsys_python.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index ac9bc92..adfa377 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -154,8 +154,13 @@ class PythonRecipeHandler(RecipeHandler):
         if 'buildsystem' in handled:
             return False
 
-        if not RecipeHandler.checkfiles(srctree, ['setup.py']):
-            return
+        # Check for non-zero size setup.py files
+        setupfiles = RecipeHandler.checkfiles(srctree, ['setup.py'])
+        for fn in setupfiles:
+            if os.path.getsize(fn):
+                break
+        else:
+            return False
 
         # setup.py is always parsed to get at certain required information, such as
         # distutils vs setuptools

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list