setup.py
This file
Path
setup.py
77 lines · 2.1 KiB · Python
Last changed by
Concurrency autodetection (#585)Tom Christiebefore adoption3cbe731
History of this fileTake it
The walk stopped after 200 commits: lines older than 7e9110b point at it.
Add additional flake8 plugins (#157)Can Sarıgölbefore adoption7e9110b
lines 1–4why, one step back1#!/usr/bin/env python2# -*- coding: utf-8 -*-34import reUse pathlib.Path instead of os.path functions (#188)Stephen Brown IIbefore adoptionfde30b8
line 5why, one step back5from pathlib import PathAdd additional flake8 plugins (#157)Can Sarıgölbefore adoption7e9110b
lines 6–13why, one step back67from setuptools import setup8910def get_version(package):11 """12 Return package version as listed in `__version__` in `init.py`.13 """Use pathlib.Path instead of os.path functions (#188)Stephen Brown IIbefore adoptionfde30b8
lines 14–15why, one step back14 version = Path(package, "__version__.py").read_text()15 return re.search("__version__ = ['\"]([^'\"]+)['\"]", version).group(1)Add additional flake8 plugins (#157)Can Sarıgölbefore adoption7e9110b
lines 16–21why, one step back161718def get_long_description():19 """20 Return the README.21 """Add CHANGELOG.md for tracking releases (#227)Seth Michael Larsonbefore adoption345a46d
line 22why, one step back22 long_description = ""Add additional flake8 plugins (#157)Can Sarıgölbefore adoption7e9110b
line 23why, one step back23 with open("README.md", encoding="utf8") as f:Add CHANGELOG.md for tracking releases (#227)Seth Michael Larsonbefore adoption345a46d
lines 24–28why, one step back24 long_description += f.read()25 long_description += "\n\n"26 with open("CHANGELOG.md", encoding="utf8") as f:27 long_description += f.read()28 return long_descriptionAdd additional flake8 plugins (#157)Can Sarıgölbefore adoption7e9110b
lines 29–34why, one step back293031def get_packages(package):32 """33 Return root package and all sub-packages.34 """Use pathlib.Path instead of os.path functions (#188)Stephen Brown IIbefore adoptionfde30b8
line 35why, one step back35 return [str(path.parent) for path in Path(package).glob("**/__init__.py")]Add additional flake8 plugins (#157)Can Sarıgölbefore adoption7e9110b
lines 36–48why, one step back363738setup(39 name="httpx",40 python_requires=">=3.6",41 version=get_version("httpx"),42 url="https://github.com/encode/httpx",43 license="BSD",44 description="The next generation HTTP client.",45 long_description=get_long_description(),46 long_description_content_type="text/markdown",47 author="Tom Christie",48 author_email="tom@tomchristie.com",Enable mypy to discover type hints as specified in PEP 561 (#194)Andrew M. Whitebefore adoptionc7a5ce7
line 49why, one step back49 package_data={"httpx": ["py.typed"]},Add additional flake8 plugins (#157)Can Sarıgölbefore adoption7e9110b
line 50why, one step back50 packages=get_packages("httpx"),Release 0.7.1 (#234)Seth Michael Larsonbefore adoptioncaba785
line 51why, one step back51 include_package_data=True,Add zip_safe=False to setup() (#361)Florimond Mancabefore adoption061d943
line 52why, one step back52 zip_safe=False,Add additional flake8 plugins (#157)Can Sarıgölbefore adoption7e9110b
lines 53–54why, one step back53 install_requires=[54 "certifi",Concurrency autodetection (#585)Tom Christiebefore adoption3cbe731
line 55why, one step back55 "hstspreload",Add additional flake8 plugins (#157)Can Sarıgölbefore adoption7e9110b
lines 56–60why, one step back56 "chardet==3.*",57 "h11==0.8.*",58 "h2==3.*",59 "idna==2.*",60 "rfc3986==1.*",Concurrency autodetection (#585)Tom Christiebefore adoption3cbe731
line 61why, one step back61 "sniffio==1.*",Add additional flake8 plugins (#157)Can Sarıgölbefore adoption7e9110b
lines 62–69why, one step back62 ],63 classifiers=[64 "Development Status :: 3 - Alpha",65 "Environment :: Web Environment",66 "Intended Audience :: Developers",67 "License :: OSI Approved :: BSD License",68 "Operating System :: OS Independent",69 "Topic :: Internet :: WWW/HTTP",Add AsyncIO and Trio trove classifiers (#416)Quentin Pradetbefore adoption7f76a64
lines 70–71why, one step back70 "Framework :: AsyncIO",71 "Framework :: Trio",Add additional flake8 plugins (#157)Can Sarıgölbefore adoption7e9110b
lines 72–77why, one step back72 "Programming Language :: Python :: 3",73 "Programming Language :: Python :: 3.6",74 "Programming Language :: Python :: 3.7",75 "Programming Language :: Python :: 3.8",76 ],77)