Skip to content
Myr

setup.py

This file

Path

setup.py

75 lines · 2.3 KiB · Python

Last changed by

Merge pull request #686 from Lukasa/developKenneth Reitzbefore adoptionbcf04d5

History of this file

Take it

1#!/usr/bin/env python23"""4distutils/setuptools install script. See inline comments for packaging documentation.5"""67import os8import sys910import requests11from requests.compat import is_py31213try:14    from setuptools import setup15    # hush pyflakes16    setup17except ImportError:18    from distutils.core import setup1920if sys.argv[-1] == 'publish':21    os.system('python setup.py sdist upload')22    sys.exit()2324packages = [25    'requests',26    'requests.packages',27    'requests.packages.urllib3',28    'requests.packages.urllib3.packages',29    'requests.packages.urllib3.packages.ssl_match_hostname',30]3132# certifi is a Python package containing a CA certificate bundle for SSL verification.33# On certain supported platforms (e.g., Red Hat / Debian / FreeBSD), Requests can34# use the system CA bundle instead; see `requests.utils` for details.35# If your platform is supported, set `requires` to [] instead:36requires = ['certifi>=0.0.7']3738# chardet is used to optimally guess the encodings of pages that don't declare one.39# At this time, chardet is not a required dependency. However, it's sufficiently40# important that pip/setuptools should install it when it's unavailable.41if is_py3:42    chardet_package = 'chardet2'43else:44    chardet_package = 'chardet>=1.0.0'45    requires.append('oauthlib>=0.1.0,<0.2.0')4647requires.append(chardet_package)4849setup(50    name='requests',51    version=requests.__version__,52    description='Python HTTP for Humans.',53    long_description=open('README.rst').read() + '\n\n' +54                     open('HISTORY.rst').read(),55    author='Kenneth Reitz',56    author_email='me@kennethreitz.com',57    url='http://python-requests.org',58    packages=packages,59    package_data={'': ['LICENSE', 'NOTICE']},60    include_package_data=True,61    install_requires=requires,62    license=open("LICENSE").read(),63    classifiers=(64        'Development Status :: 5 - Production/Stable',65        'Intended Audience :: Developers',66        'Natural Language :: English',67        'License :: OSI Approved :: ISC License (ISCL)',68        'Programming Language :: Python',69        'Programming Language :: Python :: 2.6',70        'Programming Language :: Python :: 2.7',71        'Programming Language :: Python :: 3',72        'Programming Language :: Python :: 3.0',73        'Programming Language :: Python :: 3.1',74    ),75)