setup.py
This file
Path
setup.py
83 lines · 2.3 KiB · Python
Last changed by
Packaging dependancy tweaks (#1206)Joebefore adoption15c1e42
History of this fileTake it
The walk stopped after 200 commits: lines older than 21f5337 point at it.
Add 'Third Party Packages' docs page (#876)Florimond Mancabefore adoption21f5337
lines 1–58why, one step back1#!/usr/bin/env python2# -*- coding: utf-8 -*-34import re5from pathlib import Path67from setuptools import setup8910def get_version(package):11 """12 Return package version as listed in `__version__` in `init.py`.13 """14 version = Path(package, "__version__.py").read_text()15 return re.search("__version__ = ['\"]([^'\"]+)['\"]", version).group(1)161718def get_long_description():19 """20 Return the README.21 """22 long_description = ""23 with open("README.md", encoding="utf8") as f:24 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_description293031def get_packages(package):32 """33 Return root package and all sub-packages.34 """35 return [str(path.parent) for path in Path(package).glob("**/__init__.py")]363738setup(39 name="httpx",40 python_requires=">=3.6",41 version=get_version("httpx"),42 url="https://github.com/encode/httpx",43 project_urls={44 "Documentation": "https://www.python-httpx.org",45 "Source": "https://github.com/encode/httpx",46 },47 license="BSD",48 description="The next generation HTTP client.",49 long_description=get_long_description(),50 long_description_content_type="text/markdown",51 author="Tom Christie",52 author_email="tom@tomchristie.com",53 package_data={"httpx": ["py.typed"]},54 packages=get_packages("httpx"),55 include_package_data=True,56 zip_safe=False,57 install_requires=[58 "certifi",Version 0.13.0.dev2 (#941)Tom Christiebefore adoption97d488a
line 59why, one step back59 "sniffio",Add 'Third Party Packages' docs page (#876)Florimond Mancabefore adoption21f5337
line 60why, one step back60 "chardet==3.*",Packaging dependancy tweaks (#1206)Joebefore adoption15c1e42
line 61why, one step back61 "rfc3986[idna2008]>=1.3,<2",HTTP/2 becomes fully optional (#1140)Tom Christiebefore adoption8d9dfb5
line 62why, one step back62 "httpcore==0.10.*",Add 'Third Party Packages' docs page (#876)Florimond Mancabefore adoption21f5337
line 63why, one step back63 ],HTTP/2 becomes fully optional (#1140)Tom Christiebefore adoption8d9dfb5
lines 64–65why, one step back64 extras_require={65 "http2": "h2==3.*",Packaging dependancy tweaks (#1206)Joebefore adoption15c1e42
line 66why, one step back66 "brotli": "brotlipy==0.7.*",HTTP/2 becomes fully optional (#1140)Tom Christiebefore adoption8d9dfb5
line 67why, one step back67 },Add 'Third Party Packages' docs page (#876)Florimond Mancabefore adoption21f5337
lines 68–83why, one step back68 classifiers=[69 "Development Status :: 4 - Beta",70 "Environment :: Web Environment",71 "Intended Audience :: Developers",72 "License :: OSI Approved :: BSD License",73 "Operating System :: OS Independent",74 "Topic :: Internet :: WWW/HTTP",75 "Framework :: AsyncIO",76 "Framework :: Trio",77 "Programming Language :: Python :: 3",78 "Programming Language :: Python :: 3.6",79 "Programming Language :: Python :: 3.7",80 "Programming Language :: Python :: 3.8",81 "Programming Language :: Python :: 3 :: Only",82 ],83)