File tree Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Expand file tree Collapse file tree 2 files changed +4
-13
lines changed Original file line number Diff line number Diff line change 5353copyright  =  u'2013, Evonove' 
5454
5555
56- def  get_version (package ):
57-     """ 
58-     Return package version as listed in `__version__` in `init.py`. 
59-     """ 
60-     init_py  =  open (os .path .join (package , '__init__.py' )).read ()
61-     return  re .match ("__version__ = ['\" ]([^'\" ]+)['\" ]" , init_py ).group (1 )
62- 
63- 
6456# The version info for the project you're documenting, acts as replacement for 
6557# |version| and |release|, also used in various other places throughout the 
6658# built documents. 
6759# 
6860# The short X.Y version. 
69- version  =  get_version ( os . path . join ( ".." ,  " oauth2_provider" )) 
61+ version  =  oauth2_provider . __version__ 
7062# The full version, including alpha/beta/rc tags. 
7163release  =  version 
7264
Original file line number Diff line number Diff line change 1- __version__   =   '0.12.0' 
1+ import   pkg_resources 
22
3- __author__  =  "Massimiliano Pippi & Federico Frenguelli" 
43
5- default_app_config  =  'oauth2_provider.apps.DOTConfig' 
4+ __version__  =  pkg_resources . require ( "django-oauth-toolkit" )[ 0 ]. version 
65
7- VERSION  =  __version__    # synonym 
6+ default_app_config  =  "oauth2_provider.apps.DOTConfig" 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments