Skip to content

Commit c6a7168

Browse files
committed
No longer delete .venv directory in Python build script
If you're using the correct Python version (which you're supposed to be), the script will try to delete the Python executable that's running it(!), which, understandably, fails.
1 parent 28ab854 commit c6a7168

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

datafiles/Data/Python/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@ This is a subproject of Open Note Block Studio, which holds the Python modules u
1010

1111
3. This subproject uses [poetry](https://python-poetry.org/) for managing dependencies. Make sure to install it, and run the following command with the subproject's root (`datafiles/Data/Python`) as your current working directory:
1212

13-
```shell
14-
$ poetry env use 3.8 # if you have more than one Python version installed
15-
$ poetry install --no-dev
16-
```
13+
```shell
14+
$ poetry env use 3.8 # if you have more than one Python version installed
15+
$ poetry install --no-dev
16+
```
1717

1818
4. Run `package.py`:
1919

20-
```shell
21-
$ python package.py
22-
```
20+
```shell
21+
$ python package.py
22+
```
2323

24-
This will delete the virtual environment created on the last step, and prepare all dependencies to be packaged with Note Block Studio's executable.
24+
This will prepare all dependencies to be packaged with Note Block Studio's executable.
2525
26-
5. Open the project in GameMaker, and save it so the included files are registered. **Do NOT commit the changes to the project file.**
26+
5. Delete the `.venv` directory that was created.
2727
28-
6. You can now build the project in GameMaker!
28+
6. Open the project in GameMaker, and save it so the included files are registered. **Do NOT commit the changes to the project file.**
29+
30+
7. You can now build the project in GameMaker!

datafiles/Data/Python/package.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,10 @@ def main():
116116
if filename.endswith(".py"):
117117
os.remove(os.path.join(root, filename))
118118

119-
# Delete virtual environment
120-
print("Removing virtual environment")
121-
shutil.rmtree(ENV_PATH)
122-
123119
print(f"Done! {package_count} packages were added.")
120+
print(
121+
f"Don't forget to delete the {ENV_PATH} directory before building the GameMaker project."
122+
)
124123

125124

126125
if __name__ == "__main__":

0 commit comments

Comments
 (0)