From 767dad4e264f01c349ce0b075ed917cf4dd70b02 Mon Sep 17 00:00:00 2001 From: Dennis den Ouden-van der Horst Date: Wed, 14 Jan 2026 15:12:13 +0100 Subject: [PATCH 1/2] Update to v0.4.2 and improve packaging metadata Bump version to 0.4.2. Enhance setup.cfg with full metadata and dependencies, and simplify setup.py to only call setup(). --- CHANGELOG.md | 7 +++++ setup.cfg | 38 +++++++++++++++++++++++++ setup.py | 50 ++------------------------------- sphinx_togglebutton/__init__.py | 2 +- 4 files changed, 48 insertions(+), 49 deletions(-) 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): From ff35b126b3b9dfee68f79e7c04f267bb152bc6a6 Mon Sep 17 00:00:00 2001 From: Dennis den Ouden-van der Horst Date: Wed, 14 Jan 2026 15:20:23 +0100 Subject: [PATCH 2/2] Bump version to 0.4.3 and update tests workflow Updated the GitHub Actions tests workflow to specify the packages_dir for PyPI publishing. Updated CHANGELOG for version 0.4.3 and incremented the package version in __init__.py. --- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 6 ++++++ sphinx_togglebutton/__init__.py | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8a2e6ab..a021c65 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,4 +25,4 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_KEY }} - \ No newline at end of file + packages_dir: dist/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index e370c50..7a9ca4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.4.3 - 2026-01-14 + +### Fixed + +- Added missing information in `tests.yml`. + ## 0.4.2 - 2026-01-14 ### Fixed diff --git a/sphinx_togglebutton/__init__.py b/sphinx_togglebutton/__init__.py index cd5687d..6ca3ba8 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.2" +__version__ = "0.4.3" def st_static_path(app):