cant depend on build-helper to have cdist.version module

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
remotes/origin/prometheus
Steven Armstrong 8 years ago
parent d5b1246791
commit 4a7ef82bf8
  1. 13
      setup.py

@ -1,9 +1,20 @@
from distutils.core import setup
import cdist
import os
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):
entries = []
for name in os.listdir(data_dir):

Loading…
Cancel
Save