-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
63 lines (54 loc) · 2.11 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env python
import os
import sys
from setuptools import setup
def get_metadata():
import re
with open(os.path.join("epoch_analyzer", "__init__.py")) as f:
return dict(re.findall("__([a-z]+)__ = ['\"]([^'\"]+)['\"]", f.read()))
metadata = get_metadata()
if sys.argv[-1] == 'publish':
os.system('cd docs && make html')
os.system('python setup.py sdist')
print("You probably want to upload it to pypi:")
print(" twine upload dist/* -p")
print("You probably want to also tag the version now:")
print(" git tag -a %s -m 'version %s'" % (metadata['version'], metadata['version']))
print(" git push --tags")
sys.exit()
try:
long_description = open("README.rst", "r").read()
except Exception:
long_description = None
setup(
name='epoch_analyzer',
version=metadata['version'],
license='MIT',
packages=['epoch_analyzer'],
author='Martin van Wingerden',
author_email='[email protected]',
url='https://github.com/martinvw/epoch-analyzer',
download_url='https://github.com/martinvw/epoch-analyzer/tarball/v' + metadata['version'],
description='Utility detect probable date/time formats given a numeric input.',
long_description=long_description,
entry_points={'console_scripts': ['epoch = epoch_analyzer.epoch_console:main', 'epoch_scan = epoch_analyzer.epoch_search_console:main']},
include_package_data=True,
install_requires=[],
keywords=['datetime', 'timestamp', 'epoch'],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: System :: Filesystems',
'Development Status :: 4 - Beta',
'Topic :: Terminals',
'Topic :: Utilities',
],
)