Skip to content

Commit

Permalink
Update setup.py and docs to do dev.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ankith26 committed Oct 3, 2024
1 parent f43e74e commit 6176e5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 2 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ but the documentation can also be launched with `python -m pygame.docs`

Steps:

- Install Sphinx (`pip install Sphinx`)
- Fork the pygame-ce repository, download and navigate to it in the terminal
- Run `python -m buildconfig docs`
- Run `python dev.py docs`
- If you are using the legacy `python setup.py docs` (which is now deprecated):
- (Run `python -m pip install -U pip setuptools` first if `ModuleNotFoundError: No module named setuptools` occurs)

Expand All @@ -30,7 +29,7 @@ is useful when editing the theme CSS.


--- **INSTEAD USE** ---
There is also `python -m buildconfig docs full_generation` for regenerating
There is also `python dev.py docs --full` for regenerating
everything regardless of whether Sphinx thinks it should be regenerated. This
is useful when editing the theme CSS.

Expand Down
10 changes: 3 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,11 +807,9 @@ def run(self):
runs Sphinx to build the docs.
'''
import subprocess
command_line = [
sys.executable, "-m", "buildconfig", "docs"
]
command_line = [sys.executable, "dev.py", "docs"]
if self.fullgeneration:
command_line.append('full_generation')
command_line.append('--full')

print("WARNING: This command is deprecated and will be removed in the future.")
print(f"Please use the following replacement: `{' '.join(command_line)}`\n")
Expand All @@ -834,9 +832,7 @@ def run(self):
runs mypy to build the docs.
'''
import subprocess
command_line = [
sys.executable, os.path.join("buildconfig", "stubs", "stubcheck.py")
]
command_line = [sys.executable, "dev.py", "stubs"]
print("WARNING: This command is deprecated and will be removed in the future.")
print(f"Please use the following replacement: `{' '.join(command_line)}`\n")
result = subprocess.run(command_line)
Expand Down

0 comments on commit 6176e5c

Please sign in to comment.