diff --git a/CHANGELOG.md b/CHANGELOG.md index ba82782..e370c50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 0.4.2 - 2026-01-14 + +### Fixed + +- Enhanced `setup.cfg` with complete metadata. +- Simplified `setup.py` to just call `setup()`. + ## 0.4.1 - 2026-01-14 ### Fixed diff --git a/setup.cfg b/setup.cfg index 0c9e0fc..22d6c7e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,40 @@ [metadata] +name = sphinx-togglebutton +version = attr: sphinx_togglebutton.__version__ +description = Toggle page content and collapse admonitions in Sphinx. +long_description = file: README.md +long_description_content_type = text/markdown +author = Chris Holdgraf +author_email = choldgraf@berkeley.edu +url = https://github.com/executablebooks/sphinx-togglebutton +license = MIT License license_file = LICENSE +classifiers = + License :: OSI Approved :: MIT License + +[options] +packages = find: +install_requires = + setuptools + wheel + sphinx + docutils + +[options.extras_require] +sphinx = + matplotlib + numpy + myst_nb + sphinx_book_theme + sphinx_design + sphinx_examples + +[options.package_data] +sphinx_togglebutton = + _static/togglebutton.css + _static/togglebutton.js + _static/togglebutton-chevron.svg + translations/README.md + translations/_convert.py + translations/jsons/*.json + translations/locales/**/* diff --git a/setup.py b/setup.py index 720b60c..6068493 100644 --- a/setup.py +++ b/setup.py @@ -1,49 +1,3 @@ -from pathlib import Path +from setuptools import setup -from setuptools import find_packages, setup - -version = [ - line - for line in Path("sphinx_togglebutton/__init__.py").read_text().split("\n") - if "__version__" in line -] -version = version[0].split(" = ")[-1].strip('"') - -with open("./README.md", "r") as ff: - readme_text = ff.read() - -setup( - name="sphinx-togglebutton", - version=version, - description="Toggle page content and collapse admonitions in Sphinx.", - long_description=readme_text, - long_description_content_type="text/markdown", - author="Chris Holdgraf", - author_email="choldgraf@berkeley.edu", - url="https://github.com/executablebooks/sphinx-togglebutton", - license="MIT License", - packages=find_packages(), - package_data={ - "sphinx_togglebutton": [ - "_static/togglebutton.css", - "_static/togglebutton.js", - "_static/togglebutton-chevron.svg", - "translations/README.md", - "translations/_convert.py", - "translations/jsons/*.json", - "translations/locales/**/*", - ] - }, - install_requires=["setuptools", "wheel", "sphinx", "docutils"], - extras_require={ - "sphinx": [ - "matplotlib", - "numpy", - "myst_nb", - "sphinx_book_theme", - "sphinx_design", - "sphinx_examples", - ] - }, - classifiers=["License :: OSI Approved :: MIT License"], -) +setup() diff --git a/sphinx_togglebutton/__init__.py b/sphinx_togglebutton/__init__.py index 323310f..cd5687d 100644 --- a/sphinx_togglebutton/__init__.py +++ b/sphinx_togglebutton/__init__.py @@ -9,7 +9,7 @@ MESSAGE_CATALOG_NAME = "togglebutton" translate = get_translation(MESSAGE_CATALOG_NAME) -__version__ = "0.4.1" +__version__ = "0.4.2" def st_static_path(app):