Skip to content

Commit

Permalink
Merge pull request #2889 from pygame-community/ankith26-docs-dev
Browse files Browse the repository at this point in the history
Fix `python -m docs` dev time convenience command
  • Loading branch information
zoldalma999 authored May 30, 2024
2 parents 4dbcd4f + 289815a commit 2812c81
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
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

0 comments on commit 2812c81

Please sign in to comment.