Parse package version from const.py file
+import re
import setuptools
+from codecs import open
+from os import path
+
+PACKAGE_NAME = "discord_slash"
+HERE = path.abspath(path.dirname(__file__))
with open("README.md", "r", encoding="UTF-8") as f:
long_description = f.read()
+with open(path.join(HERE, PACKAGE_NAME, "const.py"), encoding="utf-8") as fp:
+ VERSION = re.search('__version__ = "([^"]+)"', fp.read()).group(1)
setuptools.setup(
name="discord-py-slash-command",
- version="1.2.2",
+ version=VERSION,
author="eunwoo1104",
author_email="sions04@naver.com",
description="A simple discord slash command handler for discord.py.",
