File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1414
1515import  datetime 
1616
17- import  virtualenvwrapper .version 
17+ # Try to import the version from our package, but if that fails 
18+ # because of the way the RTD build works fall back to at least using 
19+ # the git tag information. 
20+ try :
21+     from  virtualenvwrapper .version  import  version 
22+ except  ImportError :
23+     import  subprocess 
24+     p  =  subprocess .run (['git' , 'describe' ], stdout = subprocess .PIPE )
25+     version  =  p .stdout .decode ('utf-8' ).strip ()
1826
1927# If extensions (or modules to document with autodoc) are in another directory, 
2028# add these directories to sys.path here. If the directory is relative to the 
5260# built documents. 
5361# 
5462# The short X.Y version. 
55- version  =  virtualenvwrapper . version . version 
63+ #  version = "SEE IMPORTS ABOVE" 
5664# The full version, including alpha/beta/rc tags. 
5765release  =  version 
5866
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments