Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Feb 23, 2022. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
66 lines (56 loc) · 2.09 KB
/
Copy pathsetup.py
File metadata and controls
66 lines (56 loc) · 2.09 KB
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
# Copyright (C) 2015 Twitter, Inc.
importos
importsys
fromsetuptoolsimportsetup, find_packages
DESCRIPTION='A Twitter supported and maintained GNIP SDK for Python.'
LONG_DESCRIPTION=None
URL='http://twitterdev.github.io/gnip-python-sdk/'
DOWNLOAD_URL='https://github.com/twitterdev/gnip-python-sdk/tarball/master'
defget_version(version_tuple):
ifnotisinstance(version_tuple[-1], int):
return'.'.join(map(str, version_tuple[:-1])) +version_tuple[-1]
return'.'.join(map(str, version_tuple))
init=os.path.join(os.path.dirname(__file__), 'gnip', '__init__.py')
version_line=list(filter(lambdal: l.startswith('VERSION'), open(init)))[0]
VERSION=get_version(eval(version_line.split('=')[-1]))
CLASSIFIERS= [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries :: Python Modules',
]
extra_opts= {
'setup_requires': ['pytest-runner'],
'tests_require': ['pytest', 'responses', 'mock']
}
ifsys.version_info[0] !=3:
extra_opts['setup_requires'].append('flake8')
setup(
name='gnip',
version=VERSION,
author='Emma Lam',
author_email='elam@twitter.com',
url=URL,
download_url=DOWNLOAD_URL,
license='MIT',
include_package_data=True,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
platforms=['any'],
classifiers=CLASSIFIERS,
scripts=['bin/gnip'],
install_requires=['pyyaml', 'requests-oauthlib', 'python-dateutil'],
packages=find_packages(exclude=['docs', 'tests']),
**extra_opts
)