mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 06:07:08 +00:00
23 lines
508 B
Python
23 lines
508 B
Python
"""Setups the project."""
|
|
|
|
import pathlib
|
|
|
|
from setuptools import setup
|
|
|
|
|
|
CWD = pathlib.Path(__file__).absolute().parent
|
|
|
|
|
|
def get_version():
|
|
"""Gets the gymnasium version."""
|
|
path = CWD / "gymnasium" / "__init__.py"
|
|
content = path.read_text()
|
|
|
|
for line in content.splitlines():
|
|
if line.startswith("__version__"):
|
|
return line.strip().split()[-1].strip().strip('"')
|
|
raise RuntimeError("bad version data in __init__.py")
|
|
|
|
|
|
setup(name="gymnasium", version=get_version())
|