6 if os.path.exists("PKG-INFO"):
7 with open("PKG-INFO", "r") as p:
9 g = re.match(r'Version: (.*)', l)
11 minor_version = g.group(1)
13 with os.popen("git log --format=format:%ct.%h -n1 .") as m:
14 minor_version = m.read()
16 # setup.py and setup_fuse.py both share the build/ directory (argh!) so
17 # make sure to delete it to avoid scooping up the wrong files.
18 build_dir = os.path.join(os.path.dirname(sys.argv[0]), 'build')
19 shutil.rmtree(build_dir, ignore_errors=True)