Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
feat: make isal optional and installed only as an extra (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jan 4, 2024
1 parent a82a022 commit 0b5754b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ If `isal` is available, this library will try to use `isal`, and will fallback t

## Installation

Install this via pip (or your favourite package manager):
Install this via pip (or your favorite package manager):

`pip install aiohttp-zlib-ng`

To install the optional `isal` speed up:

`pip install aiohttp-zlib-ng[isal]`

## Usage

Enable [zlib-ng](https://github.com/pycompression/python-zlib-ng) support in aiohttp by calling `enable_zlib_ng`
Expand Down
24 changes: 14 additions & 10 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ packages = [
python = "^3.8"
aiohttp = ">=3.8.5"
zlib-ng = ">=0.3.0"
isal = {markers = "platform_machine == \"x86_64\" or platform_machine == \"AMD64\" or platform_machine == \"aarch64\" or platform_machine == \"arm64\"", version = ">=1.5.3"}
isal = {version = ">=1.5.3", optional = true, markers = "platform_machine == \"x86_64\" or platform_machine == \"AMD64\" or platform_machine == \"aarch64\" or platform_machine == \"arm64\""}

[tool.poetry.group.dev.dependencies]
pytest = "^7.0"
pytest-cov = "^3.0"


[tool.poetry.extras]
isal = ["isal"]

[tool.semantic_release]
branch = "main"
version_toml = ["pyproject.toml:tool.poetry.version"]
Expand Down

0 comments on commit 0b5754b

Please sign in to comment.