Clone of official tools

Revision:
43:2a7da56ebd24
Parent:
40:7d3fa6b99b2b
--- a/export/embitz/__init__.py	Mon Nov 06 13:17:14 2017 -0600
+++ b/export/embitz/__init__.py	Tue Sep 25 13:43:09 2018 -0500
@@ -15,6 +15,7 @@
 limitations under the License.
 """
 from os.path import splitext, basename
+from os import remove
 from tools.targets import TARGET_MAP
 from tools.export.exporters import Exporter, apply_supported_whitelist
 
@@ -52,14 +53,14 @@
     def generate(self):
         self.resources.win_to_unix()
         source_files = []
-        for r_type, n in self.FILE_TYPES.iteritems():
+        for r_type, n in self.FILE_TYPES.items():
             for file in getattr(self.resources, r_type):
                 source_files.append({
                     'name': file, 'type': n
                 })
 
         libraries = []
-        for lib in self.resources.libraries:
+        for lib in self.libraries:
             l, _ = splitext(basename(lib))
             libraries.append(l[3:])
 
@@ -87,3 +88,7 @@
         }
 
         self.gen_file('embitz/eix.tmpl', ctx, '%s.eix' % self.project_name)
+
+    @staticmethod
+    def clean(project_name):
+        remove("%s.eix" % project_name)