Skip to content

Commit

Permalink
Merge pull request #526 from zware/fix_implicit_setuptools_dependency
Browse files Browse the repository at this point in the history
Avoid implicitly depending on setuptools
  • Loading branch information
mosquito authored Feb 28, 2023
2 parents 4fa1f9d + 4543822 commit 83d5432
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions aio_pika/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from pkg_resources import get_distribution

from . import abc, patterns, pool
from .abc import DeliveryMode
from .channel import Channel
Expand All @@ -15,7 +13,12 @@
from .robust_queue import RobustQueue


__version__ = get_distribution("aio-pika").version
try:
from importlib.metadata import Distribution
__version__ = Distribution.from_name("aio-pika").version
except ImportError:
import pkg_resources
__version__ = pkg_resources.get_distribution("aio-pika").version


__all__ = (
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ packages = [{ include = "aio_pika" }]

[tool.poetry.dependencies]
python = "^3.7"
aiormq= "~6.7.1"
aiormq = "~6.7.1"
yarl = [{ version = '*'}]
typing_extensions = [{ version = '*', python = "< 3.8" }]
# for pkg_resources
setuptools = [{ version = '*', python = "< 3.8" }]

[tool.poetry.group.dev.dependencies]
aiomisc = "^16.2"
Expand Down

0 comments on commit 83d5432

Please sign in to comment.