Skip to content
Myr

setup.py

This file

Path

setup.py

69 lines · 1.8 KiB · Python

Last changed by

Rename -> httpxTom Christiebefore adoption219ece0

History of this file

Take it

1#!/usr/bin/env python2# -*- 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    """14    with open(os.path.join(package, "__version__.py")) as f: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(38    name="httpx",39    python_requires=">=3.6",40    version=get_version("httpx"),41    url="https://github.com/encode/httpx",42    license="BSD",43    description="The next generation HTTP client.",44    long_description=get_long_description(),45    long_description_content_type="text/markdown",46    author="Tom Christie",47    author_email="tom@tomchristie.com",48    packages=get_packages("httpx"),49    install_requires=[50        "certifi",51        "chardet==3.*",52        "h11==0.8.*",53        "h2==3.*",54        "idna==2.*",55        "rfc3986==1.*",56    ],57    classifiers=[58        "Development Status :: 3 - Alpha",59        "Environment :: Web Environment",60        "Intended Audience :: Developers",61        "License :: OSI Approved :: BSD License",62        "Operating System :: OS Independent",63        "Topic :: Internet :: WWW/HTTP",64        "Programming Language :: Python :: 3",65        "Programming Language :: Python :: 3.6",66        "Programming Language :: Python :: 3.7",67        "Programming Language :: Python :: 3.8",68    ],69)