setup.py
This file
Path
setup.py
97 lines · 2.8 KiB · Python
Last changed by
Merged masterBraulio Valdivielso Martínezbefore adoption141db28
History of this fileTake it
The walk stopped after 200 commits: lines older than 958845a point at it.
requests[security]Kenneth Reitzbefore adoption958845a
lines 1–3why, one step back1#!/usr/bin/env python23import osMerge pull request #2486 from sigmavirus24/bug/2462Cory Benfieldbefore adoption8a2fd7c
line 4why, one step back4import rerequests[security]Kenneth Reitzbefore adoption958845a
lines 5–6why, one step back5import sys6Merge pull request #2199 from mtorromeo/patch-1Kenneth Reitzbefore adoption0df32de
lines 7–8why, one step back7from codecs import open8Merged masterBraulio Valdivielso Martínezbefore adoption141db28
lines 9–10why, one step back9from setuptools import setup10from setuptools.command.test import test as TestCommandrequests[security]Kenneth Reitzbefore adoption958845a
line 11why, one step back11Merged masterBraulio Valdivielso Martínezbefore adoption141db28
lines 12–31why, one step back1213class PyTest(TestCommand):14 user_options = [('pytest-args=', 'a', "Arguments to pass into py.test")]1516 def initialize_options(self):17 TestCommand.initialize_options(self)18 self.pytest_args = []1920 def finalize_options(self):21 TestCommand.finalize_options(self)22 self.test_args = []23 self.test_suite = True2425 def run_tests(self):26 import pytest2728 errno = pytest.main(self.pytest_args)29 sys.exit(errno)3031requests[security]Kenneth Reitzbefore adoption958845a
lines 32–46why, one step back32if sys.argv[-1] == 'publish':33 os.system('python setup.py sdist upload')34 sys.exit()3536packages = [37 'requests',38 'requests.packages',39 'requests.packages.chardet',40 'requests.packages.urllib3',41 'requests.packages.urllib3.packages',42 'requests.packages.urllib3.contrib',43 'requests.packages.urllib3.util',44 'requests.packages.urllib3.packages.ssl_match_hostname',45]46Merge pull request #2203 from Lukasa/remove_certifiKenneth Reitzbefore adoption359659c
line 47why, one step back47requires = []Merged masterBraulio Valdivielso Martínezbefore adoption141db28
line 48why, one step back48test_requirements = ['pytest>=2.8.0', 'pytest-httpbin==0.0.7', 'pytest-cov']requests[security]Kenneth Reitzbefore adoption958845a
line 49why, one step back49Merge pull request #2486 from sigmavirus24/bug/2462Cory Benfieldbefore adoption8a2fd7c
line 50why, one step back50with open('requests/__init__.py', 'r') as fd:Merge pull request #2518 from deronnax/shorter_version_extractionIan Cordascobefore adoption460caf7
lines 51–52why, one step back51 version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',52 fd.read(), re.MULTILINE).group(1)Merge pull request #2486 from sigmavirus24/bug/2462Cory Benfieldbefore adoption8a2fd7c
lines 53–56why, one step back5354if not version:55 raise RuntimeError('Cannot find version information')56Merge pull request #2199 from mtorromeo/patch-1Kenneth Reitzbefore adoption0df32de
line 57why, one step back57with open('README.rst', 'r', 'utf-8') as f:requests[security]Kenneth Reitzbefore adoption958845a
line 58why, one step back58 readme = f.read()Merge pull request #2199 from mtorromeo/patch-1Kenneth Reitzbefore adoption0df32de
line 59why, one step back59with open('HISTORY.rst', 'r', 'utf-8') as f:requests[security]Kenneth Reitzbefore adoption958845a
lines 60–63why, one step back60 history = f.read()6162setup(63 name='requests',Merge pull request #2486 from sigmavirus24/bug/2462Cory Benfieldbefore adoption8a2fd7c
line 64why, one step back64 version=version,requests[security]Kenneth Reitzbefore adoption958845a
lines 65–82why, one step back65 description='Python HTTP for Humans.',66 long_description=readme + '\n\n' + history,67 author='Kenneth Reitz',68 author_email='me@kennethreitz.com',69 url='http://python-requests.org',70 packages=packages,71 package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},72 package_dir={'requests': 'requests'},73 include_package_data=True,74 install_requires=requires,75 license='Apache 2.0',76 zip_safe=False,77 classifiers=(78 'Development Status :: 5 - Production/Stable',79 'Intended Audience :: Developers',80 'Natural Language :: English',81 'License :: OSI Approved :: Apache Software License',82 'Programming Language :: Python',Merged masterBraulio Valdivielso Martínezbefore adoption141db28
line 83why, one step back83 'Programming Language :: Python :: 2.6',requests[security]Kenneth Reitzbefore adoption958845a
lines 84–86why, one step back84 'Programming Language :: Python :: 2.7',85 'Programming Language :: Python :: 3',86 'Programming Language :: Python :: 3.3',Update trove classifiers.Cory Benfieldbefore adoption4dffe5e
lines 87–88why, one step back87 'Programming Language :: Python :: 3.4',88 'Programming Language :: Python :: 3.5',Merged masterBraulio Valdivielso Martínezbefore adoption141db28
lines 89–90why, one step back89 'Programming Language :: Python :: Implementation :: CPython',90 'Programming Language :: Python :: Implementation :: PyPy'requests[security]Kenneth Reitzbefore adoption958845a
line 91why, one step back91 ),Merged masterBraulio Valdivielso Martínezbefore adoption141db28
lines 92–93why, one step back92 cmdclass={'test': PyTest},93 tests_require=test_requirements,requests[security]Kenneth Reitzbefore adoption958845a
line 94why, one step back94 extras_require={Merge pull request #2891 from lorenzph/pyopenssl-min-versionCory Benfieldbefore adoption6c47a0c
line 95why, one step back95 'security': ['pyOpenSSL>=0.13', 'ndg-httpsclient', 'pyasn1'],requests[security]Kenneth Reitzbefore adoption958845a
lines 96–97why, one step back96 },97)