]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Initial commit
authorTom Christie <tom@tomchristie.com>
Thu, 4 Apr 2019 12:27:55 +0000 (13:27 +0100)
committerTom Christie <tom@tomchristie.com>
Thu, 4 Apr 2019 12:27:55 +0000 (13:27 +0100)
.gitignore [new file with mode: 0644]
LICENSE.md [new file with mode: 0644]
httpcore/__init__.py [new file with mode: 0644]
setup.py [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..938e2d1
--- /dev/null
@@ -0,0 +1,8 @@
+*.pyc
+.coverage
+.pytest_cache/
+.mypy_cache/
+__pycache__/
+htmlcov/
+*.egg-info/
+venv/
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644 (file)
index 0000000..8963b9f
--- /dev/null
@@ -0,0 +1,27 @@
+Copyright © 2019, [Encode OSS Ltd](https://www.encode.io/).
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/httpcore/__init__.py b/httpcore/__init__.py
new file mode 100644 (file)
index 0000000..f102a9c
--- /dev/null
@@ -0,0 +1 @@
+__version__ = "0.0.1"
diff --git a/setup.py b/setup.py
new file mode 100644 (file)
index 0000000..bf42cf4
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import os
+import re
+
+from setuptools import setup
+
+
+def get_version(package):
+    """
+    Return package version as listed in `__version__` in `init.py`.
+    """
+    with open(os.path.join(package, "__init__.py")) as f:
+        return re.search("__version__ = ['\"]([^'\"]+)['\"]", f.read()).group(1)
+
+
+def get_long_description():
+    """
+    Return the README.
+    """
+    with open("README.md", encoding="utf8") as f:
+        return f.read()
+
+
+def get_packages(package):
+    """
+    Return root package and all sub-packages.
+    """
+    return [
+        dirpath
+        for dirpath, dirnames, filenames in os.walk(package)
+        if os.path.exists(os.path.join(dirpath, "__init__.py"))
+    ]
+
+
+setup(
+    name="httpcore",
+    python_requires=">=3.6",
+    version=get_version("httpcore"),
+    url="https://github.com/encode/httpcore",
+    license="BSD",
+    description="...",
+    long_description=get_long_description(),
+    long_description_content_type="text/markdown",
+    author="Tom Christie",
+    author_email="tom@tomchristie.com",
+    packages=get_packages("httpcore"),
+    data_files=[("", ["LICENSE.md"])],
+    install_requires=["h11"],
+    classifiers=[
+        "Development Status :: 3 - Alpha",
+        "Environment :: Web Environment",
+        "Intended Audience :: Developers",
+        "License :: OSI Approved :: BSD License",
+        "Operating System :: OS Independent",
+        "Topic :: Internet :: WWW/HTTP",
+        "Programming Language :: Python :: 3",
+        "Programming Language :: Python :: 3.6",
+        "Programming Language :: Python :: 3.7",
+        "Programming Language :: Python :: 3.8",
+    ],
+)