Skip to content

Commit

Permalink
new: dev: switch to dynamic versioning, update package deps and tox file
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Arnold <nerdboy@gentoo.org>
sarnold committed Oct 26, 2024
1 parent 08f1ebc commit 4d1ecd4
Showing 5 changed files with 23 additions and 5 deletions.
6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ A small python module implementing redis-ipc concepts.

|ci| |pylint| |bandit|

|pre| |cov|
|pre| |cov| |contributors|

|python| |tag| |license| |style|

@@ -278,3 +278,7 @@ remember to specify the socket path when running redis-cli ::
.. |style| image:: https://img.shields.io/badge/Py%20code%20style-pylint-00000.svg
:target: https://github.com/pycqa/pylint/
:alt: Python Style

.. |contributors| image:: https://img.shields.io/github/contributors/VCTLabs/redis-ipc-py
:target: https://github.com/VCTLabs/redis-ipc-py/
:alt: Contributors
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
[build-system]
requires = ["setuptools>=40.8.0"]
requires = [
"setuptools>=45",
"setuptools_scm[toml]>=6.2",
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]

[tool.coverage.run]
branch = true
source = ["redis_ipc.py"]
8 changes: 7 additions & 1 deletion redis_ipc.py
Original file line number Diff line number Diff line change
@@ -9,14 +9,20 @@

import json
import os
import sys
import tempfile
import time
from pathlib import Path

import redis
from redis import ConnectionPool, StrictRedis

__version__ = '0.0.1'
if sys.version_info < (3, 8):
from importlib_metadata import version
else:
from importlib.metadata import version

__version__ = version('redis_ipc')

# instead of global pdb import, add this where you want to start debugger:
# import pdb; pdb.set_trace()
5 changes: 4 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = redis_ipc
version = attr: redis_ipc.__version__
attr: setuptools_scm.get_version
author = The redis_ipc Authors
author_email = <answers@vctlabs.com>
maintainer = Steve Arnold
@@ -31,6 +31,9 @@ zip_safe = True
py_modules =
redis_ipc

setup_requires =
setuptools_scm[toml]

install_requires =
importlib-metadata; python_version < '3.8'
redis
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -150,7 +150,7 @@ deps =

commands =
pip install redis_ipc --pre --prefer-binary -f dist/
python -c 'import pkg_resources; print(pkg_resources.get_distribution("redis_ipc").version)'
python -c 'from redis_ipc import __version__; print(f"redis_ipc: {__version__}")'

[testenv:docs]
skip_install = true

0 comments on commit 4d1ecd4

Please sign in to comment.