Skip to content
Myr

setup.py

This file

Path

setup.py

73 lines · 2.1 KiB · Python

Last changed by

new classifiers for 3.2+Kenneth Reitzbefore adoption7c520ec

History of this file

Take it

1#!/usr/bin/env python23import os4import sys56import requests7from requests.compat import is_py289try:10    from setuptools import setup11except ImportError:12    from distutils.core import setup1314if sys.argv[-1] == 'publish':15    os.system('python setup.py sdist upload')16    sys.exit()1718os.environ['PYTHONDONTWRITEBYTECODE'] = '1'1920packages = [21    'requests',22    'requests.packages',23    'requests.packages.urllib3',24    'requests.packages.urllib3.packages',25    'requests.packages.urllib3.packages.ssl_match_hostname'26]2728if is_py2:29    packages.extend([30        'requests.packages.oauthlib',31        'requests.packages.oauthlib.oauth1',32        'requests.packages.oauthlib.oauth1.rfc5849',33        'requests.packages.oauthlib.oauth2',34        'requests.packages.oauthlib.oauth2.draft25',35        'requests.packages.chardet',36    ])37else:38    packages.append('requests.packages.chardet2')3940requires = []4142setup(43    name='requests',44    version=requests.__version__,45    description='Python HTTP for Humans.',46    long_description=open('README.rst').read() + '\n\n' +47                     open('HISTORY.rst').read(),48    author='Kenneth Reitz',49    author_email='me@kennethreitz.com',50    url='http://python-requests.org',51    packages=packages,52    package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},53    package_dir={'requests': 'requests'},54    include_package_data=True,55    install_requires=requires,56    license=open('LICENSE').read(),57    classifiers=(58        'Development Status :: 5 - Production/Stable',59        'Intended Audience :: Developers',60        'Natural Language :: English',61        'License :: OSI Approved :: ISC License (ISCL)',62        'Programming Language :: Python',63        'Programming Language :: Python :: 2.6',64        'Programming Language :: Python :: 2.7',65        'Programming Language :: Python :: 3',66        'Programming Language :: Python :: 3.0',67        'Programming Language :: Python :: 3.1',68        'Programming Language :: Python :: 3.2',69        'Programming Language :: Python :: 3.3',70    ),71)7273del os.environ['PYTHONDONTWRITEBYTECODE']