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

1#!/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    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",49    package_data={"httpx": ["py.typed"]},50    packages=get_packages("httpx"),51    include_package_data=True,52    zip_safe=False,53    install_requires=[54        "certifi",55        "chardet==3.*",56        "h11==0.8.*",57        "h2==3.*",58        "hstspreload>=2019.8.27",59        "idna==2.*",60        "rfc3986==1.*",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",69        "Framework :: AsyncIO",70        "Framework :: Trio",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)