Skip to content
Myr

setup.py

This file

Path

setup.py

98 lines · 3.0 KiB · Python

Last changed by

number of cores for travisKenneth Reitzbefore adoptione6e3589

History of this file

Take it

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

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

lines 1–10why, one step back
1#!/usr/bin/env python
23import os4import re5import sys67from codecs import open89from setuptools import setup10from setuptools.command.test import test as TestCommand

number of cores for travisKenneth Reitzbefore adoptione6e3589

line 11why, one step back
11from multiprocessing import cpu_count

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

line 12why, one step back
12

Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b

line 13why, one step back
13here = os.path.abspath(os.path.dirname(__file__))

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

lines 14–19why, one step back
14
15class PyTest(TestCommand):16 user_options = [('pytest-args=', 'a', "Arguments to pass into py.test")]1718 def initialize_options(self):19 TestCommand.initialize_options(self)

number of cores for travisKenneth Reitzbefore adoptione6e3589

line 20why, one step back
20 self.pytest_args = ['-n', str(cpu_count()), '--boxed']

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

lines 21–32why, one step back
21
22 def finalize_options(self):23 TestCommand.finalize_options(self)24 self.test_args = []25 self.test_suite = True2627 def run_tests(self):28 import pytest2930 errno = pytest.main(self.pytest_args)31 sys.exit(errno)32

Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b

line 33why, one step back
33# 'setup.py publish' shortcut.

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

line 34why, one step back
34if sys.argv[-1] == 'publish':

fix setup.pyKenneth Reitzbefore adoption0aee483

lines 35–36why, one step back
35 os.system('python setup.py sdist bdist_wheel')
36 os.system('twine upload dist/*')

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

lines 37–38why, one step back
37 sys.exit()
38

vastly simpify making packages available for backwards compatibilityKenneth Reitzbefore adoption28666e5

line 39why, one step back
39packages = ['requests']

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

line 40why, one step back
40

Merge pull request #4067 from kennethreitz/depsKenneth Reitzbefore adoptiona6c3a0c

lines 41–47why, one step back
41requires = [
42 'chardet>=3.0.2,<3.1.0',43 'idna>=2.5,<2.6',44 'urllib3>=1.21.1,<1.22',45 'certifi>=2017.4.17'4647]

Merge pull request #4083 from kennethreitz/faster-ciKenneth Reitzbefore adoption148ab30

line 48why, one step back
48test_requirements = ['pytest-httpbin==0.0.7', 'pytest-cov', 'pytest-mock', 'pytest-xdist', 'PySocks>=1.5.6, !=1.5.7', 'pytest>=2.8.0']

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

line 49why, one step back
49

Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b

line 50why, one step back
50about = {}

cleanup version.pyKenneth Reitzbefore adoptiona44284c

line 51why, one step back
51with open(os.path.join(here, 'requests', '__version__.py'), 'r', 'utf-8') as f:

Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b

line 52why, one step back
52 exec(f.read(), about)

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

lines 53–59why, one step back
53
54with open('README.rst', 'r', 'utf-8') as f:55 readme = f.read()56with open('HISTORY.rst', 'r', 'utf-8') as f:57 history = f.read()5859setup(

Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b

lines 60–62why, one step back
60 name=about['__title__'],
61 version=about['__version__'],62 description=about['__description__'],

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

line 63why, one step back
63 long_description=readme + '\n\n' + history,

Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b

lines 64–66why, one step back
64 author=about['__author__'],
65 author_email=about['__author_email__'],66 url=about['__url__'],

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

lines 67–71why, one step back
67 packages=packages,
68 package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},69 package_dir={'requests': 'requests'},70 include_package_data=True,71 install_requires=requires,

Merge branch 'master' of github.com:kennethreitz/requestsKenneth Reitzbefore adoption733ff4b

line 72why, one step back
72 license=about['__license__'],

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

lines 73–85why, one step back
73 zip_safe=False,
74 classifiers=(75 'Development Status :: 5 - Production/Stable',76 'Intended Audience :: Developers',77 'Natural Language :: English',78 'License :: OSI Approved :: Apache Software License',79 'Programming Language :: Python',80 'Programming Language :: Python :: 2.6',81 'Programming Language :: Python :: 2.7',82 'Programming Language :: Python :: 3',83 'Programming Language :: Python :: 3.3',84 'Programming Language :: Python :: 3.4',85 'Programming Language :: Python :: 3.5',

Merge pull request #3801 from andriisoldatenko/add-python-36Kenneth Reitzbefore adoptiona43845e

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

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

lines 87–94why, one step back
87 'Programming Language :: Python :: Implementation :: CPython',
88 'Programming Language :: Python :: Implementation :: PyPy'89 ),90 cmdclass={'test': PyTest},91 tests_require=test_requirements,92 extras_require={93 'security': ['pyOpenSSL>=0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'],94 'socks': ['PySocks>=1.5.6, !=1.5.7'],

Merge pull request #4014 from Lukasa/even-more-compatCory Benfieldbefore adoption2e496c3

line 95why, one step back
95 'socks:sys_platform == "win32" and (python_version == "2.7" or python_version == "2.6")': ['win_inet_pton'],

we don't support python 3.2Kenneth Reitzbefore adoption5a280a1

lines 96–98why, one step back
96 },
97)98