Skip to content
Myr

setup.py

This file

Path

setup.py

83 lines · 2.5 KiB · Python

Last changed by

Merge pull request #579 from slingamn/pyflakes.releaseKenneth Reitzbefore adoption3d373e2

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–14why, one step back
12
13try:14 from setuptools import setup

Merge pull request #579 from slingamn/pyflakes.releaseKenneth Reitzbefore adoption3d373e2

lines 15–16why, one step back
15 # hush pyflakes
16 setup

80kKenneth Reitzbefore adoption50298bb

lines 17–23why, one step back
17except ImportError:
18 from distutils.core import setup1920if sys.argv[-1] == 'publish':21 os.system('python setup.py sdist upload')22 sys.exit()23

only do oreos for 2Kenneth Reitzbefore adoptione695941

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

80kKenneth Reitzbefore adoption50298bb

line 32why, one step back
32

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

lines 33–41why, one step back
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 can35# use the system CA bundle instead; see `requests.utils` for details.36# If your platform is supported, set `requires` to [] instead:37requires = ['certifi>=0.0.7']3839# 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 sufficiently41# important that pip/setuptools should install it when it's unavailable.

80kKenneth Reitzbefore adoption50298bb

line 42why, one step back
42if is_py3:

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

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

80kKenneth Reitzbefore adoption50298bb

line 44why, one step back
44else:

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

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

oauthlibKenneth Reitzbefore adoption9324c2a

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

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

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

80kKenneth Reitzbefore adoption50298bb

line 49why, one step back
49

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

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

80kKenneth Reitzbefore adoption50298bb

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

only do oreos for 2Kenneth Reitzbefore adoptione695941

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

80kKenneth Reitzbefore adoption50298bb

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

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

lines 68–69why, one step back
68 install_requires=requires,
69 extras_require=extras_require,

blahKenneth Reitzbefore adoptionbcbc1be

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

80kKenneth Reitzbefore adoption50298bb

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