From 1db57e13c4c5b3510edf4d03e8fa2cde5e1b9f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=B3pez=20Barr=C3=B3n?= Date: Sat, 27 Jun 2026 18:37:15 +1000 Subject: [PATCH 1/3] preparing pypi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian López Barrón --- .github/workflows/python-package.yml | 8 ++++++-- .gitignore | 2 ++ LICENSE | 2 +- README.md | 2 +- pyproject.toml | 12 ++++++++++-- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ee7e02e..b574a22 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -6,12 +6,15 @@ on: [push] jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v5 - - name: Set up Python 3.14 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: - python-version: "3.14" + python-version: ${{ matrix.python-version }} - name: Install run: | python -m pip install --upgrade pip @@ -22,6 +25,7 @@ jobs: PYTHONWARNINGS=error pytest --cov --durations=10 . # https://github.com/marketplace/actions/codecov - name: Codecov Report + if: matrix.python-version == '3.14' uses: codecov/codecov-action@v4 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index aafe530..7edaed6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ __pycache__/ *.egg-info/ .pytest_cache/ docs/_build/ +dist/ +build/ *.egg diff --git a/LICENSE b/LICENSE index b523dda..5840f63 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 chrizzftd +Copyright (c) 2026 Christian López Barrón Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index fd83adf..9196b8c 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Embed a REPL with the `py-repl` directive: Most options drive [pyrepl-web](https://github.com/chrizzFTD/pyrepl-web)'s attributes, with a few exceptions unique to this extension: -| Option | Description | pyrepl-web attr? | +| Option | Description | `pyrepl-web` attr? | |--------|-------------|------------------| | `:theme:` | Color theme (`catppuccin-mocha`, `catppuccin-latte`) | ✅ | | `:packages:` | Comma-separated PyPI packages to preload | ✅ | diff --git a/pyproject.toml b/pyproject.toml index 0b4e774..254604b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,19 +8,27 @@ authors = [{name = "Christian López Barrón", email = "chris.gfz@gmail.com"}] readme = "README.md" license = {file = "LICENSE"} classifiers = [ - "Programming Language :: Python :: 3", + "Development Status :: 4 - Beta", "Framework :: Sphinx :: Extension", "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Topic :: Documentation", ] keywords = ["sphinx", "pyrepl", "pyodide", "repl"] dynamic = ["version", "description"] -requires-python = ">=3.14" +requires-python = ">=3.12" dependencies = [ "sphinx>9", ] [project.urls] Home = "https://github.com/chrizzFTD/sphinx-pyrepl-web" +Documentation = "https://sphinx-pyrepl-web.readthedocs.io/" +Repository = "https://github.com/chrizzFTD/sphinx-pyrepl-web" +Issues = "https://github.com/chrizzFTD/sphinx-pyrepl-web/issues" [project.optional-dependencies] test = [ From 661feaf75444bef0530c7bc4fa529e2670f0929c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=B3pez=20Barr=C3=B3n?= Date: Sat, 27 Jun 2026 18:38:18 +1000 Subject: [PATCH 2/3] Fix Sphinx version compatibility in test_basic assertion. Normalize pyrepl bool serialization across Sphinx versions and ignore local build-test venv. Co-authored-by: Cursor --- .gitignore | 1 + tests/test_basic.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 7edaed6..d2c391a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ __pycache__/ *.py[cod] *.egg-info/ .pytest_cache/ +.venv-build-test/ docs/_build/ dist/ build/ diff --git a/tests/test_basic.py b/tests/test_basic.py index 1133ec2..42f9df1 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -17,9 +17,10 @@ def test_basic(sphinx_doctree: CreateDoctree): """ ) - assert ( - [line.rstrip() for line in result.pformat().strip().splitlines()] - == """ + lines = [line.rstrip() for line in result.pformat().strip().splitlines()] + # Sphinx may serialize doctree bool attrs as "1" or "True" depending on version. + lines[0] = lines[0].replace('pyrepl="True"', 'pyrepl="1"') + assert lines == """
@@ -29,7 +30,6 @@ def test_basic(sphinx_doctree: CreateDoctree): <raw format="html" xml:space="preserve"> <py-repl></py-repl> """.strip().splitlines() - ) def test_replay_body(sphinx_doctree: CreateDoctree): From 90bce957260bf514ff01991293bc6268c6e6c2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=B3pez=20Barr=C3=B3n?= <chris.gfz@gmail.com> Date: Sat, 27 Jun 2026 18:40:20 +1000 Subject: [PATCH 3/3] Ignore local virtualenv directories used for PyPI smoke tests. Co-authored-by: Cursor <cursoragent@cursor.com> --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d2c391a..e707d28 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ __pycache__/ *.egg-info/ .pytest_cache/ .venv-build-test/ +.venv-testpypi/ docs/_build/ dist/ build/