-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
172 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
publish: | ||
name: "Publish release" | ||
runs-on: "ubuntu-latest" | ||
|
||
environment: | ||
name: deploy | ||
|
||
steps: | ||
- uses: "actions/checkout@v2" | ||
- uses: "actions/setup-python@v2" | ||
with: | ||
python-version: 3.9 | ||
- name: "Install dependencies" | ||
run: "scripts/install" | ||
- name: "Build packag" | ||
run: "scripts/build" | ||
- name: "Publish to PyPI" | ||
run: "scripts/publish" | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). | ||
|
||
## 0.1a1 (18th February, 2022) | ||
|
||
First PyPI release. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
__title__ = "httpx-caching" | ||
__description__ = "Caching for HTTPX." | ||
__version__ = "0.1a1" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
httpx==0.22.* | ||
msgpack | ||
anyio | ||
multimethod | ||
# Packaging | ||
twine==3.7.1 | ||
wheel==0.37.0 | ||
|
||
# Testing | ||
autoflake==1.4 | ||
black==22.1.0 | ||
CherryPy==18.6.1 | ||
coverage==6.3.2 | ||
flake8==4.0.1 | ||
flake8-bugbear==22.1.11 | ||
freezegun==1.2.0 | ||
isort==5.10.1 | ||
mock==4.0.3 | ||
mypy==0.941 | ||
pyparsing==3.0.7 | ||
pytest==7.1.0 | ||
pytest-asyncio==0.18.2 | ||
pytest-cov==3.0.0 | ||
pytest-mock==3.7.0 | ||
pytest-timeout==2.1.0 | ||
types-dataclasses==0.6.4 | ||
types-freezegun==1.1.7 | ||
types-mock==4.0.11 | ||
unasync==0.5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh -e | ||
|
||
if [ -d 'venv' ] ; then | ||
PREFIX="venv/bin/" | ||
else | ||
PREFIX="" | ||
fi | ||
|
||
set -x | ||
|
||
${PREFIX}python setup.py sdist bdist_wheel | ||
${PREFIX}twine check dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh -e | ||
|
||
VERSION_FILE="httpx_caching/__version__.py" | ||
|
||
if [ -d 'venv' ] ; then | ||
PREFIX="venv/bin/" | ||
else | ||
PREFIX="" | ||
fi | ||
|
||
set -x | ||
|
||
${PREFIX}twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import re | ||
from pathlib import Path | ||
|
||
from setuptools import setup | ||
|
||
|
||
def get_version(package): | ||
""" | ||
Return package version as listed in `__version__.py`. | ||
""" | ||
version = Path(package, "__version__.py").read_text() | ||
return re.search("__version__ = ['\"]([^'\"]+)['\"]", version).group(1) | ||
|
||
|
||
def get_long_description(): | ||
""" | ||
Return the README. | ||
""" | ||
long_description = "" | ||
with open("README.md", encoding="utf8") as f: | ||
long_description += f.read() | ||
# long_description += "\n\n" | ||
# with open("CHANGELOG.md", encoding="utf8") as f: | ||
# long_description += f.read() | ||
return long_description | ||
|
||
|
||
def get_packages(package): | ||
""" | ||
Return root package and all sub-packages. | ||
""" | ||
return [str(path.parent) for path in Path(package).glob("**/__init__.py")] | ||
|
||
|
||
setup( | ||
name="httpx-caching", | ||
python_requires=">=3.7", | ||
version=get_version("httpx_caching"), | ||
url="https://github.com/johtso/httpx-caching", | ||
project_urls={ | ||
"Source": "https://github.com/johtso/httpx-caching", | ||
}, | ||
license="Apache-2.0", | ||
description="Caching for HTTPX.", | ||
long_description=get_long_description(), | ||
long_description_content_type="text/markdown", | ||
author="Johannes (johtso)", | ||
author_email="[email protected]", | ||
package_data={"httpx_caching": ["py.typed"]}, | ||
packages=get_packages("httpx_caching"), | ||
include_package_data=True, | ||
zip_safe=False, | ||
install_requires=[ | ||
"httpx==0.22.*", | ||
"msgpack", | ||
"anyio", | ||
"multimethod", | ||
], | ||
extras_require={}, | ||
classifiers=[ | ||
"Development Status :: 3 - Alpha", | ||
"Environment :: Web Environment", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3 :: Only", | ||
], | ||
) |