From 0dc9db36ffe64badfb145c113e5af575ea3ebe1c Mon Sep 17 00:00:00 2001
From: inso <insomniak.fr@gmaiL.com>
Date: Sat, 6 May 2017 10:37:23 +0200
Subject: [PATCH] More generic gen_resources

---
 gen_resources.py | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/gen_resources.py b/gen_resources.py
index b73cfa71..699fdd81 100644
--- a/gen_resources.py
+++ b/gen_resources.py
@@ -3,9 +3,8 @@
 import sys, os, multiprocessing, subprocess
 
 
-sakia = os.path.abspath(os.path.join(os.path.dirname(__file__)))
+root_path = os.path.abspath(os.path.join(os.path.dirname(__file__)))
 resources = os.path.abspath(os.path.join(os.path.dirname(__file__), 'res'))
-gen_ui = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src', 'sakia', 'gen_resources'))
 gen_resources = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
 
 def convert_ui(args, **kwargs):
@@ -14,14 +13,11 @@ def convert_ui(args, **kwargs):
 def build_resources():
     try:
         to_process = []
-        for root, dirs, files in os.walk(sakia):
+        for root, dirs, files in os.walk(root_path):
             for f in files:
                 if f.endswith('.ui'):
                     source = os.path.join(root, f)
-                    if os.path.commonpath([resources, root]) == resources:
-                        dest = os.path.join(gen_ui, os.path.splitext(os.path.basename(source))[0]+'_uic.py')
-                    else:
-                        dest = os.path.join(root, os.path.splitext(os.path.basename(source))[0]+'_uic.py')
+                    dest = os.path.join(root, os.path.splitext(os.path.basename(source))[0]+'_uic.py')
 
                     exe = 'pyuic5'
                 elif f.endswith('.qrc'):
-- 
GitLab