Skip to content
Newer
Older
100755 68 lines (57 sloc) 1.76 KB
0477018 @kennethreitz easy setup.py
kennethreitz authored
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 import os
5 import sys
433452f @kennethreitz Simpler setup.py versioning.
kennethreitz authored
6 import requests
e695941 @kennethreitz only do oreos for 2
kennethreitz authored
7 from requests.compat import is_py3, is_py2
0477018 @kennethreitz easy setup.py
kennethreitz authored
8
bcd30f0 Added setuptools management to setup.py to allow to install in develo…
Alberto Paro authored
9 try:
10 from setuptools import setup
11 except ImportError:
12 from distutils.core import setup
0477018 @kennethreitz easy setup.py
kennethreitz authored
13
14
b8b87d4 @kennethreitz install simplejson if python < 2.6
kennethreitz authored
15
10eed63 @kennethreitz v0.8.4
kennethreitz authored
16 if sys.argv[-1] == 'publish':
17 os.system('python setup.py sdist upload')
7229dbe @kennethreitz Making everyone else happy.
kennethreitz authored
18 sys.exit()
0477018 @kennethreitz easy setup.py
kennethreitz authored
19
10eed63 @kennethreitz v0.8.4
kennethreitz authored
20 if sys.argv[-1] == 'test':
21 os.system('python test_requests.py')
7229dbe @kennethreitz Making everyone else happy.
kennethreitz authored
22 sys.exit()
b8b87d4 @kennethreitz install simplejson if python < 2.6
kennethreitz authored
23
38c2532 @kennethreitz new certifi
kennethreitz authored
24 required = ['certifi>=0.0.7',]
e695941 @kennethreitz only do oreos for 2
kennethreitz authored
25 packages = [
26 'requests',
27 'requests.packages',
28 'requests.packages.urllib3',
29 'requests.packages.urllib3.packages',
30 'requests.packages.urllib3.packages.ssl_match_hostname',
31 'requests.packages.urllib3.packages.mimetools_choose_boundary',
32 ]
9fd2d07 @kennethreitz reqs fixes
kennethreitz authored
33
34 if is_py3:
35 required.append('chardet2')
36 else:
37 required.append('chardet>=1.0.0')
e695941 @kennethreitz only do oreos for 2
kennethreitz authored
38 packages.append('requests.packages.oreos')
0477018 @kennethreitz easy setup.py
kennethreitz authored
39
40
41 setup(
7229dbe @kennethreitz Making everyone else happy.
kennethreitz authored
42 name='requests',
433452f @kennethreitz Simpler setup.py versioning.
kennethreitz authored
43 version=requests.__version__,
8521075 @kennethreitz playing nice.
kennethreitz authored
44 description='Python HTTP for Humans.',
7229dbe @kennethreitz Making everyone else happy.
kennethreitz authored
45 long_description=open('README.rst').read() + '\n\n' +
46 open('HISTORY.rst').read(),
47 author='Kenneth Reitz',
48 author_email='me@kennethreitz.com',
8ffb246 @kennethreitz home page url change
kennethreitz authored
49 url='http://python-requests.org',
e695941 @kennethreitz only do oreos for 2
kennethreitz authored
50 packages=packages,
10eed63 @kennethreitz v0.8.4
kennethreitz authored
51 package_data={'': ['LICENSE', 'NOTICE']},
52 include_package_data=True,
7229dbe @kennethreitz Making everyone else happy.
kennethreitz authored
53 install_requires=required,
54 license='ISC',
55 classifiers=(
d2584ff @kennethreitz Production Ready! Added Python 2.5 to Support list.
kennethreitz authored
56 'Development Status :: 5 - Production/Stable',
7229dbe @kennethreitz Making everyone else happy.
kennethreitz authored
57 'Intended Audience :: Developers',
58 'Natural Language :: English',
59 'License :: OSI Approved :: ISC License (ISCL)',
60 'Programming Language :: Python',
0477018 @kennethreitz easy setup.py
kennethreitz authored
61 'Programming Language :: Python :: 2.6',
7229dbe @kennethreitz Making everyone else happy.
kennethreitz authored
62 'Programming Language :: Python :: 2.7',
8493d83 @kennethreitz PYTHON 3
kennethreitz authored
63 'Programming Language :: Python :: 3',
9fd2d07 @kennethreitz reqs fixes
kennethreitz authored
64 'Programming Language :: Python :: 3.0',
65 'Programming Language :: Python :: 3.1',
7229dbe @kennethreitz Making everyone else happy.
kennethreitz authored
66 ),
0477018 @kennethreitz easy setup.py
kennethreitz authored
67 )
Something went wrong with that request. Please try again.