Skip to content
Myr

setup.py

This file

Path

setup.py

78 lines · 2.4 KiB · Python

Last changed by

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

History of this file

Take it

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

v0.10.1Kenneth Reitzbefore adoptionf99a253

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

v0.10.1Kenneth Reitzbefore adoptionf99a253

line 7why, one step back
7import sys

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

line 8why, one step back
8

v0.10.1Kenneth Reitzbefore adoptionf99a253

line 9why, one step back
9import requests

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

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

v0.10.1Kenneth Reitzbefore adoptionf99a253

lines 11–20why, one step back
11
12try:13 from setuptools import setup14except ImportError:15 from distutils.core import setup1617if sys.argv[-1] == 'publish':18 os.system('python setup.py sdist upload')19 sys.exit()20

only do oreos for 2Kenneth Reitzbefore adoptione695941

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

v0.10.1Kenneth Reitzbefore adoptionf99a253

line 29why, one step back
29

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

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

v0.10.1Kenneth Reitzbefore adoptionf99a253

line 39why, one step back
39if is_py3:

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

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

v0.10.1Kenneth Reitzbefore adoptionf99a253

line 41why, one step back
41else:

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

lines 42–43why, one step back
42 chardet_package = 'chardet>=1.0.0'
43requires.append(chardet_package)

v0.10.1Kenneth Reitzbefore adoptionf99a253

line 44why, one step back
44

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

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

v0.10.1Kenneth Reitzbefore adoptionf99a253

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

only do oreos for 2Kenneth Reitzbefore adoptione695941

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

v0.10.1Kenneth Reitzbefore adoptionf99a253

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

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

lines 63–64why, one step back
63 install_requires=requires,
64 extras_require=extras_require,

blahKenneth Reitzbefore adoptionbcbc1be

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

v0.10.1Kenneth Reitzbefore adoptionf99a253

lines 66–73why, one step back
66 classifiers=(
67 'Development Status :: 5 - Production/Stable',68 'Intended Audience :: Developers',69 'Natural Language :: English',70 'License :: OSI Approved :: ISC License (ISCL)',71 'Programming Language :: Python',72 'Programming Language :: Python :: 2.6',73 'Programming Language :: Python :: 2.7',

PYTHON 3Kenneth Reitzbefore adoption8493d83

line 74why, one step back
74 'Programming Language :: Python :: 3',

v0.10.1Kenneth Reitzbefore adoptionf99a253

lines 75–78why, one step back
75 'Programming Language :: Python :: 3.0',
76 'Programming Language :: Python :: 3.1',77 ),78)