How to use the tmt.EclipseProject.dist function in tmt

To help you get started, we’ve selected a few tmt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thewca / tnoodle / timer / tmtproject.py View on Github external
def dist(self, noRemake=False, implementationTitle=None):
        tmt.EclipseProject.dist(self, noRemake=noRemake, implementationTitle=implementationTitle)

        # Build standalone html files
        #  - Start a tnt server in the background.
        #  - Then run unifyhtml.unify on everything in self.unifiedHtmlFiles
        # This is easier than trying to follow the dependencies to extract
        # js files like mootools. We just let the server do its job.
        self.run(wait=False)

        for fileName, url in self.unifiedHtmlFiles.items():
            unifiedHtml = unifyhtml.unify(url, try_count=5)
            unifiedHtml = tmt.doTextSubstitution(unifiedHtml)

            with open(fileName, 'w') as out:
                out.write(unifiedHtml)

            tmt.notifyDist(fileName)