mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
Include tag distance and commit hash in dev versions when possible (#5664)
* Include tag distance and commit hash in dev versions when possible * Fix test
This commit is contained in:
11
setup.py
11
setup.py
@@ -2,9 +2,16 @@ import os
|
||||
import sys
|
||||
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
|
||||
|
||||
version = _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.
|
||||
setup(python_requires=">=3.8.1")
|
||||
setup(python_requires=">=3.8.1", version=version)
|
||||
else:
|
||||
# Metadata and options defined in setup.cfg
|
||||
setup()
|
||||
setup(version=version)
|
||||
|
||||
Reference in New Issue
Block a user