setup.py
This file
Path
setup.py
63 lines · 1.7 KiB · Python
Last changed by
Merge pull request #4 from encode/connection-poolingTom Christiebefore adoption68c468a
History of this fileTake 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, "__init__.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="httpcore",39 python_requires=">=3.6",40 version=get_version("httpcore"),41 url="https://github.com/encode/httpcore",42 license="BSD",43 description="...",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("httpcore"),49 data_files=[("", ["LICENSE.md"])],50 install_requires=["h11", "certifi"],51 classifiers=[52 "Development Status :: 3 - Alpha",53 "Environment :: Web Environment",54 "Intended Audience :: Developers",55 "License :: OSI Approved :: BSD License",56 "Operating System :: OS Independent",57 "Topic :: Internet :: WWW/HTTP",58 "Programming Language :: Python :: 3",59 "Programming Language :: Python :: 3.6",60 "Programming Language :: Python :: 3.7",61 "Programming Language :: Python :: 3.8",62 ],63)