diff --git a/docs/source/conf.py b/docs/source/conf.py index 8ce3d31..0f17ef9 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,13 +1,17 @@ # This conf.py is in large parts inspired by the oen used by stable-baselines 3 +import toml import datetime project = 'Fancy Gym' author = 'Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou' copyright = f'2020-{datetime.date.today().year}, {author}' -release = '0.2' # The full version, including alpha/beta/rc tags -version = '0.2' # The short X.Y version +pyproject_content = toml.load("../../pyproject.toml") +proj_version = pyproject_content["project"]["version"] + +release = proj_version # The full version, including alpha/beta/rc tags +version = proj_version # The short X.Y version extensions = [ 'myst_parser', @@ -50,4 +54,4 @@ html_context = { } def setup(app): - app.add_css_file("style.css") \ No newline at end of file + app.add_css_file("style.css") diff --git a/setup.py b/setup.py index 2bd077d..2a533fa 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ # We still provide a setup.py for backwards compatability. # But the pyproject.toml should be prefered. +import toml import itertools from pathlib import Path from typing import List @@ -8,6 +9,9 @@ from setuptools import setup, find_packages print('[!] You are currently installing/building fancy_gym via setup.py. This is only provided for backwards-compatability. Please use the pyproject.toml instead.') +pyproject_content = toml.load("pyproject.toml") +project_version = pyproject_content["project"]["version"] + # Environment-specific dependencies for dmc and metaworld extras = { 'dmc': ['shimmy[dm-control]', 'Shimmy==1.0.0'], @@ -38,7 +42,7 @@ def find_package_data(extensions_to_include: List[str]) -> List[str]: setup( author='Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou', name='fancy_gym', - version='0.1.0', + version=project_version, classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', @@ -55,6 +59,7 @@ setup( ], extras_require=extras, install_requires=[ + 'toml', 'mp_pytorch<=0.1.3', 'mujoco==2.3.3', 'gymnasium[mujoco]>=0.26.0'