Exemple #1
0
You should have received a copy of the GNU General Public License
along with Omega Tools.  If not, see <http://www.gnu.org/licenses/>.


This file provides some classes to simply building of gnuplot plots and LaTeX
documents using fabricate <https://code.google.com/p/fabricate/>.
'''

__version__ = '2013-05-30 18:21:28-04:00'

import os
from fabricate import *

# make use of default_builder in fabricate
from fabricate import _set_default_builder
_set_default_builder()
from fabricate import default_builder

class FabGnuplot:
    '''Class for building gnuplot plots using fabricate. So far only supports
    mp terminal.
    
    Usage example:
    Suppose there are dir1/a.gp and dir2/b.gp to be built, use:

    from fabext import *
    list_fig = ['dir1/a', 'dir2/b']
    fg = FabGnuplot(list_fig)
    fg.build_mps() # use this line to build mps figures
    fg.build_eps() # use this line to build eps figures
    fg.build_pdf() # use this line to build pdf figures
Exemple #2
0
buildpath = join(curpath, "build", APPNAME)
deploypath = join(curpath, "build", APPNAME, "qmap")
targetspath = join(curpath, 'qmap-admin', 'targets.config')
bootpath = join(curpath, "src", "loader_src")
dotnetpath = join(curpath, "src", "dotnet")

ui_sources = ['ui_datatimerpicker', 'ui_listmodules',
              'syncing/ui_sync', 'ui_listfeatures', 'ui_errorlist',
              'ui_helpviewer','ui_drawingpad', "ui_helppage"]

doc_sources = ['docs/README', 'docs/ClientSetup', 'docs/UserGuide']

iswindows = os.name == 'nt'

# HACK: Might not be the best thing to do but will work for now.
fabricate._set_default_builder()
fabricate.default_builder.quiet = True

if iswindows:
    # Add the path to MSBuild to PATH so that subprocess can find it.
    env = os.environ.copy()
    env['PATH'] += ";c:\\WINDOWS\\Microsoft.NET\Framework\\v3.5"

def readTargetsConfig():
    try:
        with open(targetspath,'r') as f:
            config = yaml.load(f)
            return config
    except IOError:
        print "Failed to open %s" % targetspath
        return