Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial PoC for packaging with manpages #12528

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Features added

Patch by Adam Turner.

* #12528: Add manpages to the sdist and wheels, so pipx and pip can install them.
Patch by Fredrik Mellström.
* #12258: Support ``typing_extensions.Unpack``
Patch by Bénédikt Tran and Adam Turner.

Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ test:
covertest:
@$(PYTHON) -X dev -X warn_default_encoding -m pytest -v --cov=sphinx --junitxml=.junit.xml $(TEST)

.PHONY: manpages
manpages:
tox run -e manpages

.PHONY: build
build:
build: manpages
@$(PYTHON) -m build .

.PHONY: docs
Expand Down
Empty file added data/.gitkeep
Empty file.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ sphinx-autogen = "sphinx.ext.autosummary.generate:main"
[tool.flit.module]
name = "sphinx"

[tool.flit.external-data]
directory = "data"

[tool.flit.sdist]
include = [
"LICENSE.rst",
Expand Down
10 changes: 10 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ deps =
commands =
sphinx-autobuild ./doc ./build/sphinx/

[testenv:manpages]
description =
Build manpages.
extras =
docs
commands =
python -c "import shutil; shutil.rmtree('./data/share/man', ignore_errors=True) if '{env:CLEAN:}' else None"
sphinx-build -M man -d "{envtmpdir}{/}doctree" ./doc ./data/share/man/man1 --color
python -c 'from pathlib import Path; Path("./data/share/man/man1/sphinx-all.1").unlink(missing_ok=True)'

[testenv:bindep]
description =
Install binary dependencies.
Expand Down