diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-06-23 17:29:15 -0400 | 
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-06-23 17:29:15 -0400 | 
| commit | 5b88a7068a6b245d99ef5998bbf659480fb85199 (patch) | |
| tree | 4ea02333849debba1119739aed2615c210c10e1f | |
| parent | 7f6926415edba55704ce07bcea063e175e3afa40 (diff) | |
| download | cbc-5b88a7068a6b245d99ef5998bbf659480fb85199.tar.gz | |
Remove temp directory creation... not worth it
| -rwxr-xr-x | cbc/environment.py | 21 | 
1 files changed, 13 insertions, 8 deletions
| diff --git a/cbc/environment.py b/cbc/environment.py index ef8f7cf..cd1389b 100755 --- a/cbc/environment.py +++ b/cbc/environment.py @@ -12,6 +12,9 @@ class Environment(object):          if 'CBC_HOME' in kwargs:
              self.cbchome = kwargs['CBC_HOME']
 +        
 +        # I want the local user environment to override what is
 +        # passed to the class.
          if 'CBC_HOME' in self.environ:
              self.cbchome = self.environ['CBC_HOME']
 @@ -21,15 +24,17 @@ class Environment(object):          if not os.path.exists(self.cbchome):
              os.makedirs(self.cbchome)
 -        temp_prefix = os.path.basename(os.path.splitext(__name__)[0])
 -        tempdir = TemporaryDirectory(prefix=temp_prefix, dir=self.cbchome)
 -        self.working_dir = tempdir.name 
 -        self.config['meta'] = self.join('meta.yaml')
 -        self.config['build'] = self.join('build.sh')
 -        self.config['build_windows'] = self.join('bld.bat')
 -        print(self.working_dir)
 +        self.config['script'] = {}
 +        self.config['script']['meta'] = self.join('meta.yaml')
 +        self.config['script']['build_linux'] = self.join('build.sh')
 +        self.config['script']['build_windows'] = self.join('bld.bat')
      def join(self, path):
          return os.path.join(self.cbchome, path)
 -            
 +    
 +    '''
 +    def local_temp(self):
 +        temp_prefix = os.path.basename(os.path.splitext(__name__)[0])
 +        return TemporaryDirectory(prefix=temp_prefix, dir=self.cbchome)        
 +    '''     
          
\ No newline at end of file | 
