You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, try to type something starts with pdm like pdm lock
Expected Behavior
If the plugin is valid, whatever you input, "test" would be output as long as you are running a pdm command
Environment Information
pdm 2.20.1
ubuntu 22.04
pdm -v output
No response
Additional Context
Reason Analysis
On windows system, plugins' installation route and loading route would be the same, both ${PROJECT}/.pdm-plugins/Lib/site-packages, but on ubuntu they are different.
On ubuntu, as site.py said
For Debian and derivatives, this sys.path is augmented with directories
for packages distributed within the distribution. Local addons go
into /usr/local/lib/python<version>/dist-packages, Debian addons
install into /usr/lib/python3/dist-packages.
/usr/lib/python<version>/site-packages is not used.
So the installation route would be /${PROJECT}/.pdm-plugins/local/lib/python{ver}/dist-packages, while the loading route got by
Describe the bug
plugins is invalid after installation on Ubuntu
To reproduce
In one pdm project, create plugin/my_plugin.py
and plugin/pyproject.toml
In pyproject.toml, add
run
pdm install --plugins
, make sure the plugins are installed successfully by checking.pdm-plugins
which should beThen, try to type something starts with
pdm
likepdm lock
Expected Behavior
If the plugin is valid, whatever you input, "test" would be output as long as you are running a
pdm
commandEnvironment Information
pdm 2.20.1
ubuntu 22.04
pdm -v output
No response
Additional Context
Reason Analysis
On windows system, plugins' installation route and loading route would be the same, both
${PROJECT}/.pdm-plugins/Lib/site-packages
, but on ubuntu they are different.On ubuntu, as
site.py
saidSo the installation route would be
/${PROJECT}/.pdm-plugins/local/lib/python{ver}/dist-packages
, while the loading route got bywould be
${PROJECT}/.pdm-plugins/lib/python{ver}/site-pacakges
, so pdm would not load any plugins on ubuntu.In fact, when I manually change the
local/lib/python{ver}/dist-packages
tolib/python{ver}/site-pacakges
, plugins are enabled.So, the two routes on ubuntu must somehow be consistent.
Are you willing to submit a PR to fix this bug?
The text was updated successfully, but these errors were encountered: