Skip to content
Snippets Groups Projects
Commit eb891603 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Fix bug when installing from tar

parent 5f369d29
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -4,17 +4,24 @@ from distutils.core import setup
import subprocess
# Write a version file containing the git hash and info
git_log = subprocess.check_output(['git', 'log', '-1', '--pretty=%h %ai']).decode('utf-8')
git_diff = (subprocess.check_output(['git', 'diff', '.'])
+ subprocess.check_output(['git', 'diff', '--cached', '.'])).decode('utf-8')
if git_diff == '':
status = '(CLEAN) ' + git_log
else:
status = '(UNCLEAN) ' + git_log
try:
git_log = subprocess.check_output(
['git', 'log', '-1', '--pretty=%h %ai']).decode('utf-8')
git_diff = (subprocess.check_output(['git', 'diff', '.'])
+ subprocess.check_output(
['git', 'diff', '--cached', '.'])).decode('utf-8')
if git_diff == '':
status = '(CLEAN) ' + git_log
else:
status = '(UNCLEAN) ' + git_log
except subprocess.CalledProcessError:
status = "NO VERSION INFORMATION"
version_file = '.version'
with open('tupak/' + version_file, 'w+') as f:
f.write(status)
setup(name='tupak',
version='0.1',
packages=['tupak'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment