Skip to content
Myr

setup.py

This file

Path

setup.py

70 lines · 1.8 KiB · Python

Last changed by

Switch hosts on HSTS preload to HTTPS (#151)Seth Michael Larsonbefore adoption3ba2e8c

History of this file

Take it

Initial commitTom Christiebefore adoptiona75bc0e

lines 1–13
1#!/usr/bin/env python
2# -*- 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 back
14 with open(os.path.join(package, "__version__.py")) as f:

Initial commitTom Christiebefore adoptiona75bc0e

lines 15–37
15 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 back
38 name="httpx",

Initial commitTom Christiebefore adoptiona75bc0e

line 39
39 python_requires=">=3.6",

Rename -> httpxTom Christiebefore adoption219ece0

lines 40–41why, one step back
40 version=get_version("httpx"),
41 url="https://github.com/encode/httpx",

Initial commitTom Christiebefore adoptiona75bc0e

line 42
42 license="BSD",

http3 (#86)Tom Christiebefore adoptionc9747aa

line 43why, one step back
43 description="The next generation HTTP client.",

Initial commitTom Christiebefore adoptiona75bc0e

lines 44–47
44 long_description=get_long_description(),
45 long_description_content_type="text/markdown",46 author="Tom Christie",47 author_email="tom@tomchristie.com",

Rename -> httpxTom Christiebefore adoption219ece0

line 48why, one step back
48 packages=get_packages("httpx"),

Add idna support. More tests.Tom Christiebefore adoptionb948798

lines 49–53why, one step back
49 install_requires=[
50 "certifi",51 "chardet==3.*",52 "h11==0.8.*",53 "h2==3.*",

Switch hosts on HSTS preload to HTTPS (#151)Seth Michael Larsonbefore adoption3ba2e8c

line 54why, one step back
54 "hstspreload",

Add idna support. More tests.Tom Christiebefore adoptionb948798

line 55why, one step back
55 "idna==2.*",

Start using flake8, fix lint issues (#126)Seth Michael Larsonbefore adoptionc1044ca

line 56why, one step back
56 "rfc3986==1.*",

Add idna support. More tests.Tom Christiebefore adoptionb948798

line 57why, one step back
57 ],

Initial commitTom Christiebefore adoptiona75bc0e

lines 58–70
58 classifiers=[
59 "Development Status :: 3 - Alpha",60 "Environment :: Web Environment",61 "Intended Audience :: Developers",62 "License :: OSI Approved :: BSD License",63 "Operating System :: OS Independent",64 "Topic :: Internet :: WWW/HTTP",65 "Programming Language :: Python :: 3",66 "Programming Language :: Python :: 3.6",67 "Programming Language :: Python :: 3.7",68 "Programming Language :: Python :: 3.8",69 ],70)