Skip to content
Myr

setup.py

This file

Path

setup.py

102 lines · 3.0 KiB · Python

Last changed by

Added python 3.6.0Andrii Soldatenkobefore adoption2bcaff9

History of this file

Take it

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

cleanup quickstartKenneth Reitzbefore adoptionbf8c831

lines 1–39why, one step back
1#!/usr/bin/env python
23import os4import re5import sys67from codecs import open89from setuptools import setup10from setuptools.command.test import test as TestCommand111213class 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)303132if 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',

Merge pull request #3620 from Lukasa/better-idnaCory Benfieldbefore adoption50486cf

line 40why, one step back
40 'requests.packages.idna',

cleanup quickstartKenneth Reitzbefore adoptionbf8c831

lines 41–45why, one step back
41 'requests.packages.urllib3',
42 'requests.packages.urllib3.packages',43 'requests.packages.urllib3.contrib',44 'requests.packages.urllib3.util',45 'requests.packages.urllib3.packages.ssl_match_hostname',

Merge pull request #3621 from Lukasa/fix-packagingIan Cordascobefore adoptionb8f4c7c

line 46why, one step back
46 'requests.packages.urllib3.packages.backports',

cleanup quickstartKenneth Reitzbefore adoptionbf8c831

lines 47–49why, one step back
47]
4849requires = []

Merge pull request #3795 from AdamWill/tests-require-pytest-mockCory Benfieldbefore adoptionedf09ad

line 50why, one step back
50test_requirements = ['pytest>=2.8.0', 'pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock']

cleanup quickstartKenneth Reitzbefore adoptionbf8c831

lines 51–90why, one step back
51
52with open('requests/__init__.py', 'r') as fd:53 version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',54 fd.read(), re.MULTILINE).group(1)5556if not version:57 raise RuntimeError('Cannot find version information')5859with open('README.rst', 'r', 'utf-8') as f:60 readme = f.read()61with open('HISTORY.rst', 'r', 'utf-8') as f:62 history = f.read()6364setup(65 name='requests',66 version=version,67 description='Python HTTP for Humans.',68 long_description=readme + '\n\n' + history,69 author='Kenneth Reitz',70 author_email='me@kennethreitz.com',71 url='http://python-requests.org',72 packages=packages,73 package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},74 package_dir={'requests': 'requests'},75 include_package_data=True,76 install_requires=requires,77 license='Apache 2.0',78 zip_safe=False,79 classifiers=(80 'Development Status :: 5 - Production/Stable',81 'Intended Audience :: Developers',82 'Natural Language :: English',83 'License :: OSI Approved :: Apache Software License',84 'Programming Language :: Python',85 'Programming Language :: Python :: 2.6',86 'Programming Language :: Python :: 2.7',87 'Programming Language :: Python :: 3',88 'Programming Language :: Python :: 3.3',89 'Programming Language :: Python :: 3.4',90 'Programming Language :: Python :: 3.5',

Added python 3.6.0Andrii Soldatenkobefore adoption2bcaff9

line 91why, one step back
91 'Programming Language :: Python :: 3.6',

cleanup quickstartKenneth Reitzbefore adoptionbf8c831

lines 92–97why, one step back
92 'Programming Language :: Python :: Implementation :: CPython',
93 'Programming Language :: Python :: Implementation :: PyPy'94 ),95 cmdclass={'test': PyTest},96 tests_require=test_requirements,97 extras_require={

Merge pull request #3693 from Lukasa/setuptools-extraCory Benfieldbefore adoption7f2a415

line 98why, one step back
98 'security': ['pyOpenSSL>=0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'],

Merge pull request #3552 from Trodis/masterIan Cordascobefore adoption39b3477

line 99why, one step back
99 'socks': ['PySocks>=1.5.6, !=1.5.7'],

cleanup quickstartKenneth Reitzbefore adoptionbf8c831

lines 100–101why, one step back
100 },
101)

Merge pull request #3693 from Lukasa/setuptools-extraCory Benfieldbefore adoption7f2a415

line 102why, one step back
102