forked from requests/toolbelt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
68 lines (58 loc) · 1.99 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
# -*- coding: utf-8 -*-
import os
import re
import sys
from setuptools import setup
if sys.argv[-1].lower() in ("submit", "publish"):
os.system("python setup.py bdist_wheel sdist upload")
sys.exit()
def get_version():
version = ''
with open('requests_toolbelt/__init__.py', 'r') as fd:
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
for line in fd:
m = reg.match(line)
if m:
version = m.group(1)
break
return version
__version__ = get_version()
if not __version__:
raise RuntimeError('Cannot find version information')
packages = [
'requests_toolbelt',
'requests_toolbelt.adapters',
'requests_toolbelt.auth',
'requests_toolbelt.downloadutils',
'requests_toolbelt.multipart',
'requests_toolbelt.threaded',
'requests_toolbelt.utils',
]
setup(
name="requests-toolbelt",
version=__version__,
description="A utility belt for advanced users of python-requests",
long_description="\n\n".join([open("README.rst").read(),
open("HISTORY.rst").read()]),
license='Apache 2.0',
author='Ian Cordasco, Cory Benfield',
author_email="[email protected]",
url="https://toolbelt.readthedocs.org",
packages=packages,
package_data={'': ['LICENSE', 'AUTHORS.rst']},
include_package_data=True,
install_requires=['requests>=2.0.1,<3.0.0'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: Apache Software License',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: Implementation :: CPython',
],
)