Version in pyproject.toml is now single source of truth
This commit is contained in:
parent
5aec4f835f
commit
259b13baa1
@ -1,13 +1,17 @@
|
|||||||
# This conf.py is in large parts inspired by the oen used by stable-baselines 3
|
# This conf.py is in large parts inspired by the oen used by stable-baselines 3
|
||||||
|
|
||||||
|
import toml
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
project = 'Fancy Gym'
|
project = 'Fancy Gym'
|
||||||
author = 'Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou'
|
author = 'Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou'
|
||||||
copyright = f'2020-{datetime.date.today().year}, {author}'
|
copyright = f'2020-{datetime.date.today().year}, {author}'
|
||||||
|
|
||||||
release = '0.2' # The full version, including alpha/beta/rc tags
|
pyproject_content = toml.load("../../pyproject.toml")
|
||||||
version = '0.2' # The short X.Y version
|
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 = [
|
extensions = [
|
||||||
'myst_parser',
|
'myst_parser',
|
||||||
|
7
setup.py
7
setup.py
@ -1,5 +1,6 @@
|
|||||||
# We still provide a setup.py for backwards compatability.
|
# We still provide a setup.py for backwards compatability.
|
||||||
# But the pyproject.toml should be prefered.
|
# But the pyproject.toml should be prefered.
|
||||||
|
import toml
|
||||||
import itertools
|
import itertools
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List
|
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.')
|
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
|
# Environment-specific dependencies for dmc and metaworld
|
||||||
extras = {
|
extras = {
|
||||||
'dmc': ['shimmy[dm-control]', 'Shimmy==1.0.0'],
|
'dmc': ['shimmy[dm-control]', 'Shimmy==1.0.0'],
|
||||||
@ -38,7 +42,7 @@ def find_package_data(extensions_to_include: List[str]) -> List[str]:
|
|||||||
setup(
|
setup(
|
||||||
author='Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou',
|
author='Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou',
|
||||||
name='fancy_gym',
|
name='fancy_gym',
|
||||||
version='0.1.0',
|
version=project_version,
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 4 - Beta',
|
'Development Status :: 4 - Beta',
|
||||||
'Intended Audience :: Science/Research',
|
'Intended Audience :: Science/Research',
|
||||||
@ -55,6 +59,7 @@ setup(
|
|||||||
],
|
],
|
||||||
extras_require=extras,
|
extras_require=extras,
|
||||||
install_requires=[
|
install_requires=[
|
||||||
|
'toml',
|
||||||
'mp_pytorch<=0.1.3',
|
'mp_pytorch<=0.1.3',
|
||||||
'mujoco==2.3.3',
|
'mujoco==2.3.3',
|
||||||
'gymnasium[mujoco]>=0.26.0'
|
'gymnasium[mujoco]>=0.26.0'
|
||||||
|
Loading…
Reference in New Issue
Block a user