Replies: 3 comments
-
You can't force the same path on different machines. You can only force the python version being used via |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply. I am aware that the path is not cross-platform - that's the reason why it makes no sense to commit .pdm-python file or the .env folder because both are local only and platform specific. This attribute is not taken into account when setting up the development environment after cloning the source repository. One has to manually make sure that the correct Python interpreter version is available and used for development across members locally. Regarding pdm supporting this: my naive point of view is that |
Beta Was this translation helpful? Give feedback.
-
Does this make sense to anyone? Is there a tool to accomplish this already? |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
sorry if this is obvious but I am new to pdm and my knowledge about Python in general is limited.
Recently, I started looking into pdm to manage my project - and it look very promising. Thanks to you @frostming.
The project sources are under version control. When I follow pdm's documentation recommendation, I will commit pyproject.toml, pdm.toml and pdm.lock to have the environment reproducible across members working with my project.
But what makes me wonder is, how do I make sure that everybody uses the same Python interpreter that the project is based on (and has been initialized)? If the members just use
pdm use
after their initial checkout, they can use whatever version is available on their system. If the members usepdm python install
prior topdm use
, they can choose whatever version they like.I trust the members of my project but I would like to have the Python interpreter version controlled by the same principles like I control the dependencies and configuration with the pyproject.toml and the pdm.lock file, i.e. reproducible and failure-safe.
Am I missing something here? Is pdm supporting this use case and I just didn't realize it? Is this use case uncommon?
BTW: I also want the Python interpreter of the project being explicitly different from the Python interpreter that pdm is using.
Thanks in advance for your thoughts.
Beta Was this translation helpful? Give feedback.
All reactions