forked from ungleich-public/cdist
		
	Revert "cant depend on build-helper to have cdist.version module"
This reverts commit 4a7ef82bf8.
	
	
This commit is contained in:
		
					parent
					
						
							
								4a7ef82bf8
							
						
					
				
			
			
				commit
				
					
						d10ba1e587
					
				
			
		
					 1 changed files with 1 additions and 12 deletions
				
			
		
							
								
								
									
										13
									
								
								setup.py
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								setup.py
									
										
									
									
									
								
							| 
						 | 
					@ -1,20 +1,9 @@
 | 
				
			||||||
from distutils.core import setup
 | 
					from distutils.core import setup
 | 
				
			||||||
 | 
					import cdist
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
import re
 | 
					import re
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Ensure version is present - the bundled/shipped version contains a static version,
 | 
					 | 
				
			||||||
# the git version contains a dynamic version
 | 
					 | 
				
			||||||
try:
 | 
					 | 
				
			||||||
    import cdist.version
 | 
					 | 
				
			||||||
except ImportError:
 | 
					 | 
				
			||||||
    import subprocess
 | 
					 | 
				
			||||||
    version = subprocess.getoutput('git describe')
 | 
					 | 
				
			||||||
    with open('cdist/version.py', 'w') as fd:
 | 
					 | 
				
			||||||
        fd.write('VERSION = "%s"\n' % version)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import cdist
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def data_finder(data_dir):
 | 
					def data_finder(data_dir):
 | 
				
			||||||
    entries = []
 | 
					    entries = []
 | 
				
			||||||
    for name in os.listdir(data_dir):
 | 
					    for name in os.listdir(data_dir):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue