All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] python3: fix indentation on create_manifest3
@ 2018-09-05 17:53 Alejandro Enedino Hernandez Samaniego
  2018-09-05 18:35 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Enedino Hernandez Samaniego @ 2018-09-05 17:53 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
---
 .../python/python3/create_manifest3.py             | 108 ++++++++++-----------
 1 file changed, 54 insertions(+), 54 deletions(-)

diff --git a/meta/recipes-devtools/python/python3/create_manifest3.py b/meta/recipes-devtools/python/python3/create_manifest3.py
index 1849152..2db5e3b 100644
--- a/meta/recipes-devtools/python/python3/create_manifest3.py
+++ b/meta/recipes-devtools/python/python3/create_manifest3.py
@@ -50,8 +50,8 @@ pyversion = str(sys.argv[1])
 # Hack to get native python search path (for folders), not fond of it but it works for now
 pivot = 'recipe-sysroot-native'
 for p in sys.path:
-  if pivot in p:
-    nativelibfolder = p[:p.find(pivot)+len(pivot)]
+    if pivot in p:
+        nativelibfolder = p[:p.find(pivot)+len(pivot)]
 
 # Empty dict to hold the whole manifest
 new_manifest = {}
@@ -65,21 +65,21 @@ hasfolders = []
 allfolders = []
 
 def isFolder(value):
-  value = value.replace('${PYTHON_MAJMIN}',pyversion)
-  if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
-    return True
-  else:
-    return False
+    value = value.replace('${PYTHON_MAJMIN}',pyversion)
+    if os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib64')) or os.path.isdir(value.replace('${libdir}',nativelibfolder+'/usr/lib32')):
+        return True
+    else:
+        return False
 
 def isCached(item):
-  if '__pycache__' in item:
-    return True
-  else:
-    return False
+    if '__pycache__' in item:
+        return True
+    else:
+        return False
 
 # Read existing JSON manifest
 with open('python3-manifest.json') as manifest:
-  old_manifest = json.load(manifest)
+    old_manifest = json.load(manifest)
 
 #
 # First pass to get core-package functionality, because we base everything on the fact that core is actually working
@@ -114,50 +114,50 @@ for coredep in output.split():
 # pass them to the manifest directly.
 
 for filedep in old_manifest['core']['files']:
-  if isFolder(filedep):
-    if isCached(filedep):
-        if filedep not in old_manifest['core']['cached']:
-            old_manifest['core']['cached'].append(filedep)
-    else:
+    if isFolder(filedep):
+        if isCached(filedep):
+            if filedep not in old_manifest['core']['cached']:
+                old_manifest['core']['cached'].append(filedep)
+        else:
+            if filedep not in old_manifest['core']['files']:
+                old_manifest['core']['files'].append(filedep)
+        continue
+    if '${bindir}' in filedep:
         if filedep not in old_manifest['core']['files']:
             old_manifest['core']['files'].append(filedep)
-    continue
-  if '${bindir}' in filedep:
-    if filedep not in old_manifest['core']['files']:
-      old_manifest['core']['files'].append(filedep)
-    continue
-  if filedep == '':
-    continue
-  if '${includedir}' in filedep:
-    if filedep not in old_manifest['core']['files']:
-      old_manifest['core']['files'].append(filedep)
-    continue
-
-  # Get actual module name , shouldnt be affected by libdir/bindir, etc.
-  pymodule = os.path.splitext(os.path.basename(os.path.normpath(filedep)))[0]
-
-
-  # We now know that were dealing with a python module, so we can import it
-  # and check what its dependencies are.
-  # We launch a separate task for each module for deterministic behavior.
-  # Each module will only import what is necessary for it to work in specific.
-  # The output of each task will contain each module's dependencies
-
-  print ('Getting dependencies for module: %s' % pymodule)
-  output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule]).decode('utf8')
-  print ('The following dependencies were found for module %s:\n' % pymodule)
-  print (output)
-
-
-  for pymodule_dep in output.split():
-    pymodule_dep = pymodule_dep.replace(pyversion,'${PYTHON_MAJMIN}')
-
-    if isCached(pymodule_dep):
-        if pymodule_dep not in old_manifest['core']['cached']:
-            old_manifest['core']['cached'].append(pymodule_dep)
-    else:
-        if pymodule_dep not in old_manifest['core']['files']:
-            old_manifest['core']['files'].append(pymodule_dep)
+        continue
+    if filedep == '':
+        continue
+    if '${includedir}' in filedep:
+        if filedep not in old_manifest['core']['files']:
+            old_manifest['core']['files'].append(filedep)
+        continue
+
+    # Get actual module name , shouldnt be affected by libdir/bindir, etc.
+    pymodule = os.path.splitext(os.path.basename(os.path.normpath(filedep)))[0]
+
+
+    # We now know that were dealing with a python module, so we can import it
+    # and check what its dependencies are.
+    # We launch a separate task for each module for deterministic behavior.
+    # Each module will only import what is necessary for it to work in specific.
+    # The output of each task will contain each module's dependencies
+
+    print ('Getting dependencies for module: %s' % pymodule)
+    output = subprocess.check_output([sys.executable, 'get_module_deps3.py', '%s' % pymodule]).decode('utf8')
+    print ('The following dependencies were found for module %s:\n' % pymodule)
+    print (output)
+
+
+    for pymodule_dep in output.split():
+        pymodule_dep = pymodule_dep.replace(pyversion,'${PYTHON_MAJMIN}')
+
+        if isCached(pymodule_dep):
+            if pymodule_dep not in old_manifest['core']['cached']:
+                old_manifest['core']['cached'].append(pymodule_dep)
+        else:
+            if pymodule_dep not in old_manifest['core']['files']:
+                old_manifest['core']['files'].append(pymodule_dep)
 
 
 # At this point we are done with the core package.
-- 
2.7.4



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

* ✗ patchtest: failure for python3: fix indentation on create_manifest3
  2018-09-05 17:53 [PATCH] python3: fix indentation on create_manifest3 Alejandro Enedino Hernandez Samaniego
@ 2018-09-05 18:35 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2018-09-05 18:35 UTC (permalink / raw)
  To: Alejandro Enedino Hernandez Samaniego; +Cc: openembedded-core

== Series Details ==

Series: python3: fix indentation on create_manifest3
Revision: 1
URL   : https://patchwork.openembedded.org/series/13907/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at bf49316bb9)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

end of thread, other threads:[~2018-09-05 18:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-05 17:53 [PATCH] python3: fix indentation on create_manifest3 Alejandro Enedino Hernandez Samaniego
2018-09-05 18:35 ` ✗ patchtest: failure for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.