-
Notifications
You must be signed in to change notification settings - Fork 11
/
setup.py
89 lines (73 loc) · 2.62 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Flask-Humanize
==============
Extension provides common humanization utilities, like turning number into a
fuzzy human-readable duration or into human-readable size, to your flask
application.
Contributing
------------
Don't hesitate to create a `GitHub issue
<https://github.com/vitalk/flask-humanize/issues>`_ for any **bug** or
**suggestion**.
"""
import io
import os
import re
from setuptools import (
find_packages, setup
)
def read(*parts):
"""Reads the content of the file created from *parts*."""
try:
with io.open(os.path.join(*parts), 'r', encoding='utf-8') as f:
return f.readlines()
except IOError:
return []
def get_version():
version_file = ''.join(read('flask_humanize', '__init__.py'))
version_match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]',
version_file, re.MULTILINE)
if version_match:
return version_match.group(1)
raise RuntimeError('Unable to find version string.')
__version__ = get_version()
install_requires = read('requirements', 'main.txt')
setup(
name='Flask-Humanize',
version=__version__,
author='Vital Kudzelka',
author_email='[email protected]',
url="https://github.com/vitalk/flask-humanize",
description='Common humanization utilities for Flask applications.',
download_url='https://github.com/vitalk/flask-humanize/tarball/%s' % __version__,
long_description=__doc__,
license='MIT',
packages=find_packages(exclude=['tests']),
zip_safe=False,
platforms='any',
install_requires=install_requires,
keywords='flask humanize datetime',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Plugins',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Framework :: Flask',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)