brozzler/setup.py

55 lines
1.8 KiB
Python
Raw Normal View History

# vim: set sw=4 et:
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'
def full_version_bytes():
import subprocess, time
try:
commit_bytes = subprocess.check_output(['git', 'log', '-1', '--pretty=format:%h'])
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))
return VERSION_BYTES + b'-' + timestamp_utc.encode('utf-8') + b'-' + commit_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'),
description='Distributed web crawling with browsers',
url='https://github.com/nlevitt/brozzler',
author='Noah Levitt',
author_email='nlevitt@archive.org',
2014-01-21 18:10:43 +00:00
long_description=open('README.md').read(),
license='Apache License 2.0',
packages=['brozzler'],
package_data={'brozzler':['behaviors.d/*.js*', 'behaviors.yaml', 'version.txt']},
scripts=glob.glob('bin/*'),
install_requires=[
'PyYAML',
'youtube-dl',
'reppy',
'requests',
'websocket-client',
'pillow',
'surt',
'rethinkstuff',
],
2014-01-21 06:41:46 +00:00
zip_safe=False,
classifiers=[
'Development Status :: 3 - Alpha',
2014-01-21 06:41:46 +00:00
'Environment :: Console',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.4',
'Topic :: Internet :: WWW/HTTP',
2014-01-21 06:41:46 +00:00
'Topic :: System :: Archiving',
])