-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python scripts: Use PDM and virtualenv to manage dependencies
PDM and virtualenv are tools to manage installation of Python modules not included in the Python Standard Library. Usage: 1. Install Pipx (e.g. `brew install pipx`) - https://pipx.pypa.io/ 2. Use Pipx to install PDM (`pipx install pdm`). 3. Run `pdm install` in MuseScore's root directory. The final command creates a virtual environment (.venv folder) and installs the dependencies mentioned in MuseScore's pyproject.toml. See #23198 for details.
- Loading branch information
Showing
6 changed files
with
268 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,9 @@ VERSION | |
temp_* | ||
|
||
*.local.cmake | ||
|
||
# Python | ||
__pycache__/ | ||
*.pyc | ||
.venv/ | ||
.pdm-python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[project] | ||
description = "Python scripts for MuseScore Studio development." | ||
readme = "https://github.com/musescore/MuseScore/wiki/Running-Python-scripts" | ||
requires-python = ">=3.9" | ||
dependencies = [ | ||
"requests>=2.32.3", | ||
"markdown>=3.6", | ||
] | ||
# Show files that use these dependencies, e.g. for requests: rg -lt py "import requests" | ||
|
||
# Useful PDM commands: | ||
# -------------------- | ||
# pdm install Install all dependencies into a virtual environment (venv). | ||
# pdm run <script> Run a Python script with access to venv. | ||
# pdm add <package> Add new dependency on a PyPi package. | ||
# pdm venv remove in-project Remove the venv (e.g. to test installation from scratch). | ||
[tool.pdm] | ||
distribution = false |
Oops, something went wrong.