File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 2020# serve to show the default.
2121
2222import os
23- from configparser import ConfigParser
23+ from pathlib import Path
2424from runpy import run_path
2525
26+ import toml
27+
2628# Check for external Sphinx extensions we depend on
2729try :
2830 import numpydoc
5052 fobj .write (rel ['long_description' ])
5153
5254# Load metadata from setup.cfg
53- config = ConfigParser ()
54- config .read (os .path .join ('..' , '..' , 'setup.cfg' ))
55- metadata = config ['metadata' ]
55+ pyproject_dict = toml .load (Path ("../../pyproject.toml" ))
56+ metadata = pyproject_dict ["project" ]
5657
5758# Add any Sphinx extension module names here, as strings. They can be
5859# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
8687
8788# General information about the project.
8889project = u'NiBabel'
89- copyright = f"2006-2022, { metadata ['maintainer' ]} <{ metadata ['author_email' ]} >"
90+ author_name = metadata ["authors" ][0 ]["name" ]
91+ author_email = metadata ["authors" ][0 ]["email" ]
92+ copyright = f"2006-2022, { author_name } <{ author_email } >"
9093
9194# The version info for the project you're documenting, acts as replacement for
9295# |version| and |release|, also used in various other places throughout the
Original file line number Diff line number Diff line change 1010doc =
1111 matplotlib >= 1.5.3
1212 numpydoc
13- sphinx >=0.3,< 3
13+ sphinx ~= 5. 3
1414 texext
15+ toml
1516minc2 =
1617 h5py
1718spm =
You can’t perform that action at this time.
0 commit comments