Skip to content

Commit

Permalink
setup: Use setup.cfg with the standard build chain and remove setup.py
Browse files Browse the repository at this point in the history
- Remove dependency to aiotools as now we use Python 3.11+
  • Loading branch information
achimnol committed Sep 14, 2023
1 parent c6143f3 commit 5c43968
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 143 deletions.
13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
# enables setuptools_scm to provide the dynamic version

[tool.towncrier]
package = "callosum"
filename = "CHANGES.md"
Expand Down Expand Up @@ -58,3 +65,9 @@ split-on-trailing-comma = true

[tool.black]
line-length = 85

[tool.mypy]
ignore_missing_imports = true

[tool.pytest]
norecursedirs = ["venv*", "virtualenv*", ".git"]
96 changes: 84 additions & 12 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,15 +1,87 @@
[bdist_wheel]
universal = 0
[metadata]
name = callosum
version = attr: callosum.__version__
author = Lablup Inc.
author_email = [email protected]
maintainer = Joongi Kim
maintainer_email = [email protected]
description = Callosum RPC Library
long_description = file: README.md, CHANGES.md
long_description_content_type = text/markdown
keywords = asyncio, rpc, pubsub, messaging
license = MIT
license_files = LICENSE
classifiers =
Development Status :: 4 - Beta
Framework :: AsyncIO
License :: OSI Approved :: MIT License
Intended Audience :: Developers
Operating System :: POSIX
Operating System :: MacOS :: MacOS X
Programming Language :: Python :: 3
Programming Language :: Python :: 3.11
Topic :: Software Development
Topic :: Software Development :: Libraries
Topic :: Communications
Topic :: Internet
platforms = POSIX
download_url = https://pypi.org/project/callosum
project_urls =
Homepage = https://github.com/lablup/callosum
Repository = https://github.com/lablup/callosum
Issues = https://github.com/lablup/callosum/issues
Changelog = https://github.com/lablup/callosum/blob/main/CHANGES.md

[options]
package_dir =
= src
packages = find:
python_requires = >=3.11
install_requires =
attrs>=21.3.0
python-dateutil>=2.8.2
msgpack>=1.0.4
temporenc>=0.1
yarl>=1.8.2
zip_safe = false
include_package_data = true

[tool:pytest]
norecursedirs = venv* virtualenv* .git
[options.packages.find]
where = src

[flake8]
# ref: http://pep8.readthedocs.io/en/latest/intro.html#error-codes
ignore = E731,E221,E241,E126,E127,E129,E401,N801,N802,W504
max-line-length = 85
builtins = _
exclude = .git, .cache, .idea, __pycache__, venv, build, dist, docs
[options.extras_require]
build =
build>=1.0.3
wheel>=0.41.0
twine~=4.0
towncrier~=22.12
test =
Click>=8.0
pytest~=7.2.2
pytest-asyncio~=0.21
pytest-cov>=4.0
pytest-mock>=3.10
codecov>=2.1
dev =
pre-commit
lint =
black~=23.9.1
ruff>=0.0.287
ruff-lsp>=0.0.38
typecheck =
mypy~=1.5.1
types-python-dateutil
docs =
sphinx~=4.3
sphinx-autodoc-typehints
thrift =
thriftpy2>=0.4.16
zmq =
pyzmq>=23.0.0
redis =
redis>=4.6.0
snappy =
python-snappy>=0.6.1

[mypy]
ignore_missing_imports = true
[bdist_wheel]
universal = false
127 changes: 0 additions & 127 deletions setup.py

This file was deleted.

4 changes: 3 additions & 1 deletion src/callosum/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = "0.9.10"
from importlib.metadata import version

__version__ = version("callosum")
3 changes: 1 addition & 2 deletions src/callosum/pubsub/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import asyncio
import functools
import logging
from contextlib import aclosing
from typing import Any, List, Mapping, Optional, Type, Union

from aiotools import aclosing

from ..abc import (
AbstractChannel,
AbstractDeserializer,
Expand Down
2 changes: 1 addition & 1 deletion src/callosum/rpc/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import asyncio
import functools
import logging
from contextlib import aclosing
from typing import (
TYPE_CHECKING,
Any,
Expand All @@ -17,7 +18,6 @@
)

import attrs
from aiotools import aclosing

from ..abc import (
AbstractChannel,
Expand Down

0 comments on commit 5c43968

Please sign in to comment.