Skip to content
Myr

setup.py

This file

Path

setup.py

76 lines · 2.0 KiB · Python

Last changed by

Add AsyncIO and Trio trove classifiers (#416)Quentin Pradetbefore adoption7f76a64

History of this file

Take it

The walk stopped after 200 commits: lines older than 77c3725 point at it.

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

lines 1–4why, one step back
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-34import re

Use pathlib.Path instead of os.path functions (#188)Stephen Brown IIbefore adoptionfde30b8

line 5why, one step back
5from pathlib import Path

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

lines 6–13why, one step back
6
7from 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 back
14 version = Path(package, "__version__.py").read_text()
15 return re.search("__version__ = ['\"]([^'\"]+)['\"]", version).group(1)

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

lines 16–21why, one step back
16
1718def get_long_description():19 """20 Return the README.21 """

Add CHANGELOG.md for tracking releases (#227)Seth Michael Larsonbefore adoption345a46d

line 22why, one step back
22 long_description = ""

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

line 23why, one step back
23 with open("README.md", encoding="utf8") as f:

Add CHANGELOG.md for tracking releases (#227)Seth Michael Larsonbefore adoption345a46d

lines 24–28why, one step back
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_description

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

lines 29–34why, one step back
29
3031def 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 back
35 return [str(path.parent) for path in Path(package).glob("**/__init__.py")]

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

lines 36–38why, one step back
36
3738setup(

Rename -> httpxTom Christiebefore adoption219ece0

line 39why, one step back
39 name="httpx",

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

line 40why, one step back
40 python_requires=">=3.6",

Rename -> httpxTom Christiebefore adoption219ece0

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

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

line 43why, one step back
43 license="BSD",

http3 (#86)Tom Christiebefore adoptionc9747aa

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

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

lines 45–48why, one step back
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 back
49 package_data={"httpx": ["py.typed"]},

Rename -> httpxTom Christiebefore adoption219ece0

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

Release 0.7.1 (#234)Seth Michael Larsonbefore adoptioncaba785

line 51why, one step back
51 include_package_data=True,

Add zip_safe=False to setup() (#361)Florimond Mancabefore adoption061d943

line 52why, one step back
52 zip_safe=False,

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

lines 53–57why, one step back
53 install_requires=[
54 "certifi",55 "chardet==3.*",56 "h11==0.8.*",57 "h2==3.*",

Release 0.7.2 (#291)Seth Michael Larsonbefore adoption8c456e4

line 58why, one step back
58 "hstspreload>=2019.8.27",

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

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

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

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

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

lines 61–68why, one step back
61 ],
62 classifiers=[63 "Development Status :: 3 - Alpha",64 "Environment :: Web Environment",65 "Intended Audience :: Developers",66 "License :: OSI Approved :: BSD License",67 "Operating System :: OS Independent",68 "Topic :: Internet :: WWW/HTTP",

Add AsyncIO and Trio trove classifiers (#416)Quentin Pradetbefore adoption7f76a64

lines 69–70why, one step back
69 "Framework :: AsyncIO",
70 "Framework :: Trio",

Add params keyword argument throughout (#85)Tom Christiebefore adoption77c3725

lines 71–76why, one step back
71 "Programming Language :: Python :: 3",
72 "Programming Language :: Python :: 3.6",73 "Programming Language :: Python :: 3.7",74 "Programming Language :: Python :: 3.8",75 ],76)