Can PDM be made standalone? #3384
Replies: 3 comments 1 reply
-
I tried using It do work well on the build machine, however. python3 -m nuitka --follow-imports src/pdm/__main__.py |
Beta Was this translation helpful? Give feedback.
-
I am curious:
|
Beta Was this translation helpful? Give feedback.
-
A standalone PDM allows you to manage Python dependencies without needing a separate Python installation, reducing one extra step. Unlike pipx, which still requires a pre-installed Python, standalone PDM bundles Python and PDM together for easier use in environments where Python isn't installed.
Extensions (like PDM plugins) are bundled into the standalone binary using tools like PyInstaller, meaning no separate installation is needed. Standalone PDM includes its own Python, so dependencies are managed within that isolated environment. |
Beta Was this translation helpful? Give feedback.
-
I managed to wrap PDM into a standalone executable using PyInstaller. The executable runs simple commands like --help and --version without requiring Python to be installed on the target system.
Here’s what I’ve done so far:
Created a wrapper script: (script.py)
Created a hook script: (hook-pdm.py)
Packaged the script using PyInstaller:
I haven’t yet tested more complex commands like pdm install or pdm add.
Beta Was this translation helpful? Give feedback.
All reactions