/
setup.py
58 lines (45 loc) 路 1.49 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
import codecs
import os.path
import re
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def fpath(name):
return os.path.join(os.path.dirname(__file__), name)
def read(fname):
return codecs.open(fpath(fname), encoding='utf-8').read()
def grep(attrname):
pattern = r"{0}\W*=\W*'([^']+)'".format(attrname)
strval, = re.findall(pattern, file_text)
return strval
file_text = read(fpath('arrow/__init__.py'))
install_requires = ['python-dateutil']
if sys.version_info[0] < 3:
install_requires.append('backports.functools_lru_cache==1.2.1')
setup(
name='arrow',
version=grep('__version__'),
description='Better dates and times for Python',
long_description=read(fpath('README.rst')),
url='https://github.com/crsmithdev/arrow/',
author='Chris Smith',
author_email="crsmithdev@gmail.com",
license='Apache 2.0',
packages=['arrow'],
zip_safe=False,
install_requires=install_requires,
test_suite="tests",
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)