sphinxcontrib-coderun/
├── pyproject.toml
├── LICENSE
├── README.md
└── sphinxcontrib/
├── __init__.py # namespace package
└── coderun/
├── __init__.py # directive + Sphinx setup()
└── static/
└── coderun.css # Run button styling
git clone https://github.com/uthcode/sphinxcontrib-coderun
cd sphinxcontrib-coderun
pip install -e .To test against a Sphinx project, add to its conf.py:
extensions = [..., "sphinxcontrib.coderun"]
coderun_url = "http://localhost:1313" # local codeapi for dev
coderun_sandbox = "gcc"pip install build twine
python -m build
# produces dist/sphinxcontrib_coderun-X.Y.Z.tar.gz
# dist/sphinxcontrib_coderun-X.Y.Z-py3-none-any.whlValidate before uploading:
python -m twine check dist/*Create an API token at pypi.org/manage/account/token scoped to this project, then:
python -m twine upload dist/*
# Username: __token__
# Password: pypi-AgEI...- Bump
versioninpyproject.toml. - Delete
dist/. - Run
python -m build. - Run
python -m twine upload dist/*.