Exemplo n.º 1
0
def get_shared_data(file, share_path='data'):
    from os.path import join as pj
    from openalea.deploy.shared_data import get_shared_data_path
    import vplants.flowerdemo
    shared_data_path = get_shared_data_path(vplants.flowerdemo.__path__,
                                            share_path=share_path)
    return pj(shared_data_path, file)
Exemplo n.º 2
0
 def __call__(self, inputs):
     package, glob, filename = inputs
     if package and filename:
         m = __import__(package, fromlist=[''])
         from openalea.deploy.shared_data import get_shared_data_path
         self._output = get_shared_data_path(m.__path__, filename)
         return (self._output,)
     else:
         return (self._output,)
Exemplo n.º 3
0
def get_shared_data(file, share_path='data'):
    try:
        from openalea.deploy.shared_data import get_shared_data_path
        import vplants.treeeditor3d as ted
        shared_data_path = get_shared_data_path(ted.__path__, share_path=share_path)
        return pj(shared_data_path, file)
    except:
        import os
        return os.getcwd()
Exemplo n.º 4
0
def get_shared_data(file, share_path='data'):
    try:
        from openalea.deploy.shared_data import get_shared_data_path
        import openalea.plantscan3d as ted
        shared_data_path = get_shared_data_path(ted.__path__,
                                                share_path=share_path)
        return pj(shared_data_path, file)
    except:
        import os
        return os.getcwd()
Exemplo n.º 5
0
 def update_input_package(self):
     ''' Update the input package text edit '''
     package = self.node.get_input(0)
     if self.updating or package is None: return
     self.updating = True
     self.package_lineedit.setText(package)
     try:
         m = __import__(package, fromlist=[''])
         datadir = get_shared_data_path(m.__path__)
     except:
         self.datadir_lineedit.clear()
     else:
         if datadir is not None:
             self.datadir_lineedit.setText(datadir)
     self._update_metadata_textedit(package)
     self.updating = False
Exemplo n.º 6
0
 def update_input_package(self):
     ''' Update the input package text edit '''
     package = self.node.get_input(0)
     if self.updating or package is None: return
     self.updating = True
     self.package_lineedit.setText(package)
     try:
         m = __import__(package, fromlist=[''])
         datadir = get_shared_data_path(m.__path__)
     except:
         self.datadir_lineedit.clear()
     else:
         if datadir is not None:
             self.datadir_lineedit.setText(datadir)
     self._update_metadata_textedit(package)
     self.updating = False
Exemplo n.º 7
0
def get_shared_data(file, share_path=pj('share', 'plantgl', 'database')):
    import os
    from os.path import pardir, exists, abspath
    import openalea.plantgl
    for prefix in ['PREFIX', 'LIBRARY_PREFIX', 'CONDA_PREFIX']:
        if prefix in os.environ:
            shared_data_path = pj(os.environ[prefix], share_path)
            break
    else:
        try:
            from openalea.deploy.shared_data import get_shared_data_path
            shared_data_path = get_shared_data_path(openalea.plantgl.__path__,
                                                    share_path=share_path)
        except ModuleNotFoundError as me:
            # Standard installation
            shared_data_path = pj(openalea.plantgl.__path__[0], pardir, pardir,
                                  share_path)
            if not exists(shared_data_path):
                # Develop installation
                shared_data_path = pj(openalea.plantgl.__path__[0], pardir,
                                      pardir, pardir, share_path)
    return abspath(pj(shared_data_path, file))
Exemplo n.º 8
0
def get_shared_data(file):
    from os.path import join as pj
    from openalea.deploy.shared_data import get_shared_data_path
    import openalea.plantik
    shared_data_path = get_shared_data_path(openalea.plantik.__path__)
    return pj(shared_data_path, file)
Exemplo n.º 9
0
def get_shared_data(file, share_path=pj('share','plantgl', 'database')):
    from openalea.deploy.shared_data import get_shared_data_path
    import openalea.plantgl
    shared_data_path = get_shared_data_path(openalea.plantgl.__path__, share_path=share_path)
    return pj(shared_data_path, file)
Exemplo n.º 10
0
def get_shared_data(file):
    import openalea.stocatree
    shared_data_path = get_shared_data_path(openalea.stocatree.__path__)
    #print "FUUUUUUUUUUUCCCCCCCCCCCCCKKKKKKKKKKKKKK : ", type(shared_data_path)
    return str(pj(shared_data_path, file))
Exemplo n.º 11
0
def get_shared_data(file):
    import openalea.sequence_analysis
    shared_data_path = get_shared_data_path(
        openalea.sequence_analysis.__path__)
    return pj(shared_data_path, file)
Exemplo n.º 12
0
def get_shared_data(file):
    import openalea.stat_tool
    shared_data_path = get_shared_data_path(openalea.stat_tool.__path__)
    return pj(shared_data_path, file)
Exemplo n.º 13
0
def get_shared_data(file):
    import openalea.stocatree
    shared_data_path = get_shared_data_path(openalea.stocatree.__path__)
    return str(pj(shared_data_path, file))
Exemplo n.º 14
0
def get_shared_data(file):
    import openalea.sequence_analysis
    shared_data_path = get_shared_data_path(openalea.sequence_analysis.__path__)
    return pj(shared_data_path, file)
Exemplo n.º 15
0
def get_shared_data(file, share_path=pj('share', 'plantgl', 'database')):
    from openalea.deploy.shared_data import get_shared_data_path
    import openalea.plantgl
    shared_data_path = get_shared_data_path(openalea.plantgl.__path__,
                                            share_path=share_path)
    return pj(shared_data_path, file)