~ubuntu-branches/ubuntu/trusty/requests/trusty-proposed

« back to all changes in this revision

Viewing changes to .pc/01_do-not-use-python-certifi.patch/setup.py

  • Committer: Package Import Robot
  • Author(s): Daniele Tricoli
  • Date: 2012-05-04 14:34:47 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20120504143447-3psyffw2slct0a1j
Tags: 0.12.1-1
* New upstream release
* debian/control
  - Added python-oauthlib to python-requests' Recommends field
* debian/patches/01_do-not-use-python-certifi.patch
  - Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
 
# -*- coding: utf-8 -*-
 
2
 
 
3
"""
 
4
distutils/setuptools install script. See inline comments for packaging documentation.
 
5
"""
3
6
 
4
7
import os
5
8
import sys
 
9
 
6
10
import requests
7
 
from requests.compat import is_py3, is_py2
 
11
from requests.compat import is_py3
8
12
 
9
13
try:
10
14
    from setuptools import setup
 
15
    # hush pyflakes
 
16
    setup
11
17
except ImportError:
12
18
    from distutils.core import setup
13
19
 
14
 
 
15
 
 
16
20
if sys.argv[-1] == 'publish':
17
21
    os.system('python setup.py sdist upload')
18
22
    sys.exit()
19
23
 
20
 
if sys.argv[-1] == 'test':
21
 
    os.system('python tests/test_requests.py')
22
 
    sys.exit()
23
 
 
24
 
required = ['certifi>=0.0.7',]
25
24
packages = [
26
25
    'requests',
27
26
    'requests.packages',
31
30
    'requests.packages.urllib3.packages.mimetools_choose_boundary',
32
31
]
33
32
 
 
33
# certifi is a Python package containing a CA certificate bundle for SSL verification.
 
34
# On certain supported platforms (e.g., Red Hat / Debian / FreeBSD), Requests can
 
35
# use the system CA bundle instead; see `requests.utils` for details.
 
36
# If your platform is supported, set `requires` to [] instead:
 
37
requires = ['certifi>=0.0.7']
 
38
 
 
39
# chardet is used to optimally guess the encodings of pages that don't declare one.
 
40
# At this time, chardet is not a required dependency. However, it's sufficiently
 
41
# important that pip/setuptools should install it when it's unavailable.
34
42
if is_py3:
35
 
    required.append('chardet2')
 
43
    chardet_package = 'chardet2'
36
44
else:
37
 
    required.append('chardet>=1.0.0')
38
 
    packages.append('requests.packages.oreos')
39
 
 
 
45
    chardet_package = 'chardet>=1.0.0'
 
46
    requires.append('oauthlib>=0.1.0,<0.2.0')
 
47
 
 
48
requires.append(chardet_package)
 
49
 
 
50
# The async API in requests.async requires the gevent package.
 
51
# This is also not a required dependency.
 
52
extras_require = {
 
53
        'async': ['gevent'],
 
54
}
40
55
 
41
56
setup(
42
57
    name='requests',
50
65
    packages=packages,
51
66
    package_data={'': ['LICENSE', 'NOTICE']},
52
67
    include_package_data=True,
53
 
    install_requires=required,
 
68
    install_requires=requires,
 
69
    extras_require=extras_require,
54
70
    license=open("LICENSE").read(),
55
71
    classifiers=(
56
72
        'Development Status :: 5 - Production/Stable',