setup.py
This file
Path
setup.py
71 lines · 1.8 KiB · Python
Last changed by
Enable mypy to discover type hints as specified in PEP 561 (#194)Andrew M. Whitebefore adoptionc7a5ce7
History of this fileTake it
Initial commitTom Christiebefore adoptiona75bc0e
lines 1–131#!/usr/bin/env python2# -*- coding: utf-8 -*-34import os5import re67from setuptools import setup8910def get_version(package):11 """12 Return package version as listed in `__version__` in `init.py`.13 """Check for connection aliveness on pool re-acquiry (#111)Tom Christiebefore adoption025240c
line 14why, one step back14 with open(os.path.join(package, "__version__.py")) as f:Initial commitTom Christiebefore adoptiona75bc0e
lines 15–3715 return re.search("__version__ = ['\"]([^'\"]+)['\"]", f.read()).group(1)161718def get_long_description():19 """20 Return the README.21 """22 with open("README.md", encoding="utf8") as f:23 return f.read()242526def get_packages(package):27 """28 Return root package and all sub-packages.29 """30 return [31 dirpath32 for dirpath, dirnames, filenames in os.walk(package)33 if os.path.exists(os.path.join(dirpath, "__init__.py"))34 ]353637setup(Rename -> httpxTom Christiebefore adoption219ece0
line 38why, one step back38 name="httpx",39 python_requires=">=3.6",Rename -> httpxTom Christiebefore adoption219ece0
lines 40–41why, one step back40 version=get_version("httpx"),41 url="https://github.com/encode/httpx",42 license="BSD",http3 (#86)Tom Christiebefore adoptionc9747aa
line 43why, one step back43 description="The next generation HTTP client.",Initial commitTom Christiebefore adoptiona75bc0e
lines 44–4744 long_description=get_long_description(),45 long_description_content_type="text/markdown",46 author="Tom Christie",47 author_email="tom@tomchristie.com",Enable mypy to discover type hints as specified in PEP 561 (#194)Andrew M. Whitebefore adoptionc7a5ce7
line 48why, one step back48 package_data={"httpx": ["py.typed"]},Rename -> httpxTom Christiebefore adoption219ece0
line 49why, one step back49 packages=get_packages("httpx"),Add idna support. More tests.Tom Christiebefore adoptionb948798
lines 50–54why, one step back50 install_requires=[51 "certifi",52 "chardet==3.*",53 "h11==0.8.*",54 "h2==3.*",Switch hosts on HSTS preload to HTTPS (#151)Seth Michael Larsonbefore adoption3ba2e8c
line 55why, one step back55 "hstspreload",Add idna support. More tests.Tom Christiebefore adoptionb948798
line 56why, one step back56 "idna==2.*",Start using flake8, fix lint issues (#126)Seth Michael Larsonbefore adoptionc1044ca
line 57why, one step back57 "rfc3986==1.*",Add idna support. More tests.Tom Christiebefore adoptionb948798
line 58why, one step back58 ],Initial commitTom Christiebefore adoptiona75bc0e
lines 59–7159 classifiers=[60 "Development Status :: 3 - Alpha",61 "Environment :: Web Environment",62 "Intended Audience :: Developers",63 "License :: OSI Approved :: BSD License",64 "Operating System :: OS Independent",65 "Topic :: Internet :: WWW/HTTP",66 "Programming Language :: Python :: 3",67 "Programming Language :: Python :: 3.6",68 "Programming Language :: Python :: 3.7",69 "Programming Language :: Python :: 3.8",70 ],71)