httpx/setup.py
Tom Christie 025240c3b3
Check for connection aliveness on pool re-acquiry (#111)
* Check for connection aliveness on pool re-acquiry

* Test for connection re-acquiry with HTTP/2

* nocover on HTTP/1.1 ConnectionResetError, since we're testing the equivelent on HTTP/2

* Fix setup.py to read version from __version__
2019-07-08 15:57:29 +01:00

71 lines
1.8 KiB
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
from setuptools import setup
def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
with open(os.path.join(package, "__version__.py")) as f:
return re.search("__version__ = ['\"]([^'\"]+)['\"]", f.read()).group(1)
def get_long_description():
"""
Return the README.
"""
with open("README.md", encoding="utf8") as f:
return f.read()
def get_packages(package):
"""
Return root package and all sub-packages.
"""
return [
dirpath
for dirpath, dirnames, filenames in os.walk(package)
if os.path.exists(os.path.join(dirpath, "__init__.py"))
]
setup(
name="http3",
python_requires=">=3.6",
version=get_version("http3"),
url="https://github.com/encode/http3",
license="BSD",
description="The next generation HTTP client.",
long_description=get_long_description(),
long_description_content_type="text/markdown",
author="Tom Christie",
author_email="tom@tomchristie.com",
packages=get_packages("http3"),
data_files=[("", ["LICENSE.md"])],
install_requires=[
"certifi",
"chardet==3.*",
"h11==0.8.*",
"h2==3.*",
"idna==2.*",
"rfc3986==1.*"
],
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Topic :: Internet :: WWW/HTTP",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
)