mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-21 08:42:32 -05:00
Fix invalid version error with _get_version()-provided version (#5670)
* Make sure that the repository we check is in the location we expect * Merge `redbot._version` into `redbot` * Generate VersionInfo in _get_version() This way, if VersionInfo.from_str() generates exception due to invalid version, we catch it.
This commit is contained in:
4
setup.py
4
setup.py
@@ -5,9 +5,9 @@ from setuptools import setup
|
||||
# Since we're importing `redbot` package, we have to ensure that it's in sys.path.
|
||||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
||||
|
||||
from redbot._version import _get_version
|
||||
from redbot import VersionInfo
|
||||
|
||||
version = _get_version(ignore_installed=True)
|
||||
version, _ = VersionInfo._get_version(ignore_installed=True)
|
||||
|
||||
if os.getenv("TOX_RED", False) and sys.version_info >= (3, 10):
|
||||
# We want to be able to test Python versions that we do not support yet.
|
||||
|
||||
Reference in New Issue
Block a user