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

Fix python -m docs dev time convenience command #2889

Merged
merged 1 commit into from
May 30, 2024
Merged
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
6 changes: 4 additions & 2 deletions docs/__main__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import platform

from pygame.docs.serve import main as serve
from pygame.docs.static import main as static
# use relative import here and not absolute, so that `python -m docs` works at
# development time
from .serve import main as serve
from .static import main as static


def main():
Expand Down
4 changes: 3 additions & 1 deletion docs/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import webbrowser
from http.server import ThreadingHTTPServer, SimpleHTTPRequestHandler

from pygame.docs import PKG_DIR, has_local_docs
# use relative import here and not absolute, so that `python -m docs` works at
# development time
from . import PKG_DIR, has_local_docs


class DocsHandler(SimpleHTTPRequestHandler):
Expand Down
4 changes: 3 additions & 1 deletion docs/static.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import webbrowser

from pygame.docs import PKG_DIR
# use relative import here and not absolute, so that `python -m docs` works at
# development time
from . import PKG_DIR


def open_docs():
Expand Down