Skip to content

Commit

Permalink
docs: fix pyproject.toml support
Browse files Browse the repository at this point in the history
  • Loading branch information
doronz88 committed May 30, 2023
1 parent 4b08b6f commit 07624a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
#
import os
import sys
import importlib
sys.path.insert(0, os.path.abspath('../src/rpcclient'))
from pathlib import Path

import toml


# -- Project information -----------------------------------------------------
Expand All @@ -26,7 +27,8 @@

# The short X.Y version
# The full version, including alpha/beta/rc tags
release = version = importlib.import_module('setup').VERSION

release = version = toml.loads(Path('../src/rpcclient/pyproject.toml').read_text())['project']['version']


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -60,7 +62,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
1 change: 1 addition & 0 deletions src/rpcclient/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dynamic = ["dependencies"]

[project.optional-dependencies]
test = ["pytest"]
docs = ["toml", "myst_parser", "sphinx", "sphinx-rtd-theme"]

[project.urls]
"Homepage" = "https://github.com/doronz88/rpc-project"
Expand Down

0 comments on commit 07624a7

Please sign in to comment.