-
Notifications
You must be signed in to change notification settings - Fork 0
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
3 changed files
with
76 additions
and
20 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
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 +1 @@ | ||
redis>=4.4.2 | ||
redis>=4.2.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,49 @@ | ||
import re | ||
from setuptools import find_packages, setup | ||
from typing import List | ||
|
||
|
||
def get_version() -> str: | ||
with open("redis_lock/__init__.py", "r") as f: | ||
pattern = r"__version__ = \"([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\"" | ||
version = re.findall(pattern, f.read()) | ||
return version[0] | ||
|
||
|
||
def get_requirements(filename: str) -> List: | ||
with open(filename, "r") as f: | ||
lines = f.readlines() | ||
return [line.strip() for line in lines] | ||
|
||
|
||
setup( | ||
name="redis-lock-py", | ||
version=get_version(), | ||
license="MIT", | ||
author="Minjae Park", | ||
author_email="miintto.log@google.com", | ||
description="Redis distributed lock implementation for Python " | ||
"base on Pub/Sub messaging", | ||
long_description=open("README.md").read().strip(), | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/miintto/redis-lock-py", | ||
|
||
packages=find_packages(include=["redis_lock"]), | ||
|
||
python_requires=">=3.7", | ||
install_requires=get_requirements("requirements.txt"), | ||
|
||
keywords=[ | ||
"redis", "distributed-lock", "python", "pubsub-messages", "asyncio" | ||
], | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
"License :: OSI Approved :: MIT License", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
], | ||
tests_require=["pytest", "pytest-asyncio"], | ||
) |