Skip to content
Myr

setup.py

This file

Path

setup.py

81 lines · 2.5 KiB · Python

Last changed by

Merge pull request #572 from slingamn/chardet_2Kenneth Reitzbefore adoptiona3e5563

History of this file

Take it

The walk stopped after 200 commits: lines older than 50298bb point at it.

80kKenneth Reitzbefore adoption50298bb

lines 1–2why, one step back
1#!/usr/bin/env python
2

Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f

lines 3–6why, one step back
3"""
4distutils/setuptools install script. See inline comments for packaging documentation.5"""6

Merge pull request #572 from slingamn/chardet_2Kenneth Reitzbefore adoptiona3e5563

line 7why, one step back
7import os

80kKenneth Reitzbefore adoption50298bb

line 8why, one step back
8import sys

Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f

line 9why, one step back
9

80kKenneth Reitzbefore adoption50298bb

line 10why, one step back
10import requests

Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f

line 11why, one step back
11from requests.compat import is_py3

80kKenneth Reitzbefore adoption50298bb

lines 12–21why, one step back
12
13try:14 from setuptools import setup15except ImportError:16 from distutils.core import setup1718if sys.argv[-1] == 'publish':19 os.system('python setup.py sdist upload')20 sys.exit()21

only do oreos for 2Kenneth Reitzbefore adoptione695941

lines 22–29why, one step back
22packages = [
23 'requests',24 'requests.packages',25 'requests.packages.urllib3',26 'requests.packages.urllib3.packages',27 'requests.packages.urllib3.packages.ssl_match_hostname',28 'requests.packages.urllib3.packages.mimetools_choose_boundary',29]

80kKenneth Reitzbefore adoption50298bb

line 30why, one step back
30

Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f

lines 31–39why, one step back
31# certifi is a Python package containing a CA certificate bundle for SSL verification.
32# On certain supported platforms (e.g., Red Hat / Debian / FreeBSD), Requests can33# use the system CA bundle instead; see `requests.utils` for details.34# If your platform is supported, set `requires` to [] instead:35requires = ['certifi>=0.0.7']3637# chardet is used to optimally guess the encodings of pages that don't declare one.38# At this time, chardet is not a required dependency. However, it's sufficiently39# important that pip/setuptools should install it when it's unavailable.

80kKenneth Reitzbefore adoption50298bb

line 40why, one step back
40if is_py3:

Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f

line 41why, one step back
41 chardet_package = 'chardet2'

80kKenneth Reitzbefore adoption50298bb

line 42why, one step back
42else:

Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f

line 43why, one step back
43 chardet_package = 'chardet>=1.0.0'

oauthlibKenneth Reitzbefore adoption9324c2a

lines 44–45why, one step back
44 requires.append('oauthlib>=0.1.0,<0.2.0')
45

Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f

line 46why, one step back
46requires.append(chardet_package)

80kKenneth Reitzbefore adoption50298bb

line 47why, one step back
47

Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f

lines 48–53why, one step back
48# The async API in requests.async requires the gevent package.
49# This is also not a required dependency.50extras_require = {51 'async': ['gevent'],52}53

80kKenneth Reitzbefore adoption50298bb

lines 54–62why, one step back
54setup(
55 name='requests',56 version=requests.__version__,57 description='Python HTTP for Humans.',58 long_description=open('README.rst').read() + '\n\n' +59 open('HISTORY.rst').read(),60 author='Kenneth Reitz',61 author_email='me@kennethreitz.com',62 url='http://python-requests.org',

only do oreos for 2Kenneth Reitzbefore adoptione695941

line 63why, one step back
63 packages=packages,

80kKenneth Reitzbefore adoption50298bb

lines 64–65why, one step back
64 package_data={'': ['LICENSE', 'NOTICE']},
65 include_package_data=True,

Change setup.py to reflect required/optional dependenciesShivaram Lingamnenibefore adoptionbdd7f8f

lines 66–67why, one step back
66 install_requires=requires,
67 extras_require=extras_require,

blahKenneth Reitzbefore adoptionbcbc1be

line 68why, one step back
68 license=open("LICENSE").read(),

80kKenneth Reitzbefore adoption50298bb

lines 69–81why, one step back
69 classifiers=(
70 'Development Status :: 5 - Production/Stable',71 'Intended Audience :: Developers',72 'Natural Language :: English',73 'License :: OSI Approved :: ISC License (ISCL)',74 'Programming Language :: Python',75 'Programming Language :: Python :: 2.6',76 'Programming Language :: Python :: 2.7',77 'Programming Language :: Python :: 3',78 'Programming Language :: Python :: 3.0',79 'Programming Language :: Python :: 3.1',80 ),81)