giving up on using git revision in version number :( latest issue is when installing a package that calls git to compute a version number, but cwd is some other git project, you get the wrong thing

This commit is contained in:
Noah Levitt 2015-09-24 00:17:33 +00:00
parent 9699a40645
commit 8c69ca3b39
5 changed files with 5 additions and 29 deletions

View file

@ -1,23 +1,8 @@
import setuptools
import glob
VERSION_BYTES = b'1.0'
def full_version_bytes():
import subprocess, time
try:
commit_num_bytes = subprocess.check_output(['git', 'rev-list', '--count', 'HEAD'])
return VERSION_BYTES + b'.' + commit_num_bytes.strip()
except subprocess.CalledProcessError:
return VERSION_BYTES
version_bytes = full_version_bytes()
with open('brozzler/version.txt', 'wb') as out:
out.write(version_bytes)
out.write(b'\n');
setuptools.setup(name='brozzler',
version=version_bytes.decode('utf-8'),
version='1.0.1',
description='Distributed web crawling with browsers',
url='https://github.com/nlevitt/brozzler',
author='Noah Levitt',
@ -25,7 +10,7 @@ setuptools.setup(name='brozzler',
long_description=open('README.rst').read(),
license='Apache License 2.0',
packages=['brozzler'],
package_data={'brozzler': ['behaviors.d/*.js*', 'behaviors.yaml', 'version.txt']},
package_data={'brozzler': ['behaviors.d/*.js*', 'behaviors.yaml']},
scripts=glob.glob('bin/*'),
install_requires=[
'PyYAML',