|
| 1 | +#!/usr/bin/env python |
| 2 | + |
| 3 | +""" |
| 4 | +This module implements a set of requests TransportAdapter, PoolManager, |
| 5 | +ConnectionPool and HTTPSConnection with one goal only: |
| 6 | +
|
| 7 | +to use a specific IP address when connecting via SSL to a web service without |
| 8 | +running into SNI trouble. The usual technique to force an IP address on an |
| 9 | +HTTP connection with Requests is (assuming I want http://example.com/some/path |
| 10 | +on IP 1.2.3.4): |
| 11 | +
|
| 12 | +requests.get("http://1.2.3.4/some/path", headers={'Host': 'example.com'}) |
| 13 | +
|
| 14 | +this is useful if I want to specifically test how 1.2.3.4 is responding; |
| 15 | +for instance, if example.com is DNS round-robined to several IP addresses |
| 16 | +and I want to hit one of them specifically. |
| 17 | +""" |
| 18 | +from setuptools import setup, find_packages |
| 19 | + |
| 20 | + |
| 21 | +PACKAGE_NAME = 'forcediphttpsadapter' |
| 22 | +PACKAGE_VERSION = '1.0.0' |
| 23 | +AUTHOR = 'Roadmaster' |
| 24 | +EMAIL = 'daniel@tomechangosubanana.com' |
| 25 | +URL = 'https://github.com/Roadmaster/forcediphttpsadapter' |
| 26 | + |
| 27 | + |
| 28 | +setup( |
| 29 | + name=PACKAGE_NAME, |
| 30 | + version=PACKAGE_VERSION, |
| 31 | + description=__doc__, |
| 32 | + author=AUTHOR, |
| 33 | + author_email=EMAIL, |
| 34 | + url=URL, |
| 35 | + # classifiers=CLASSIFIERS, |
| 36 | + # platforms=PLATFORMS, |
| 37 | + provides=['adapters'], |
| 38 | + install_requires=['requests'], |
| 39 | + # dependency_links=dependency_links, |
| 40 | + |
| 41 | + packages=find_packages(), |
| 42 | + # include_package_data=True, |
| 43 | + # package_data=package_data, |
| 44 | + |
| 45 | + download_url='{}/archive/master.zip'.format(URL), |
| 46 | + # keywords=KEYWORDS, |
| 47 | + # scripts=scripts, |
| 48 | + |
| 49 | + # entry_points={}, |
| 50 | + |
| 51 | + zip_safe=False, |
| 52 | +) |
0 commit comments