2014-05-20 00:57:07 -07:00
|
|
|
# vim: set sw=4 et:
|
|
|
|
|
2014-05-20 02:42:40 -07:00
|
|
|
import setuptools
|
2014-05-20 16:44:13 -07:00
|
|
|
import glob
|
2014-01-21 06:41:46 +00:00
|
|
|
|
2015-06-13 11:30:01 -07:00
|
|
|
VERSION_BYTES = b'1.0'
|
2014-05-29 20:43:00 -07:00
|
|
|
|
|
|
|
def full_version_bytes():
|
|
|
|
import subprocess, time
|
|
|
|
try:
|
2014-05-29 23:33:14 -07:00
|
|
|
commit_bytes = subprocess.check_output(['git', 'log', '-1', '--pretty=format:%h'])
|
2014-05-29 20:43:00 -07:00
|
|
|
t_bytes = subprocess.check_output(['git', 'log', '-1', '--pretty=format:%ct'])
|
|
|
|
t = int(t_bytes.strip().decode('utf-8'))
|
|
|
|
tm = time.gmtime(t)
|
|
|
|
timestamp_utc = time.strftime("%Y%m%d%H%M%S", time.gmtime(t))
|
2014-05-29 23:33:14 -07:00
|
|
|
return VERSION_BYTES + b'-' + timestamp_utc.encode('utf-8') + b'-' + commit_bytes.strip()
|
2014-05-29 20:43:00 -07:00
|
|
|
except subprocess.CalledProcessError:
|
|
|
|
return VERSION_BYTES
|
|
|
|
|
|
|
|
version_bytes = full_version_bytes()
|
|
|
|
with open('umbra/version.txt', 'wb') as out:
|
|
|
|
out.write(version_bytes)
|
|
|
|
out.write(b'\n');
|
|
|
|
|
2014-01-21 06:41:46 +00:00
|
|
|
setuptools.setup(name='umbra',
|
2014-05-29 20:43:00 -07:00
|
|
|
version=version_bytes.decode('utf-8'),
|
2014-05-20 00:57:07 -07:00
|
|
|
description='Browser automation via chrome debug protocol',
|
2014-01-23 18:26:20 -05:00
|
|
|
url='https://github.com/internetarchive/umbra',
|
2014-01-21 06:41:46 +00:00
|
|
|
author='Eldon Stegall',
|
|
|
|
author_email='eldon@archive.org',
|
2014-01-21 18:10:43 +00:00
|
|
|
long_description=open('README.md').read(),
|
2014-01-23 18:26:20 -05:00
|
|
|
license='Apache License 2.0',
|
2014-01-21 06:41:46 +00:00
|
|
|
packages=['umbra'],
|
2015-01-26 16:58:12 -08:00
|
|
|
package_data={'umbra':['behaviors.d/*.js*', 'behaviors.yaml', 'version.txt']},
|
2015-07-08 17:44:38 -07:00
|
|
|
install_requires=['kombu', 'websocket-client-py3==0.13.1', 'argparse', 'PyYAML', 'sortedcontainers'],
|
2014-05-29 20:43:00 -07:00
|
|
|
scripts=glob.glob('bin/*'),
|
2014-01-21 06:41:46 +00:00
|
|
|
zip_safe=False,
|
|
|
|
classifiers=[
|
2015-06-13 11:30:01 -07:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
2014-01-21 06:41:46 +00:00
|
|
|
'Environment :: Console',
|
2014-01-23 16:18:13 -05:00
|
|
|
'License :: OSI Approved :: Apache Software License',
|
2014-02-12 12:17:41 -08:00
|
|
|
'Programming Language :: Python :: 3.3',
|
2014-01-21 06:41:46 +00:00
|
|
|
'Topic :: System :: Archiving',
|
|
|
|
])
|