-
Here's my use case: I want to build a Python project inside a container with exactly the package versions as in Just to be clear: In
I'm sure I'm missing something, but why can't I just export the packages from the lock file (with any Python 3.x interpreter)? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
|
Beta Was this translation helpful? Give feedback.
-
If you are looking for a requirements file that would work in a certain range of python versions., in short words, we don't support. But I am a bit confused by what you said:
Are you trying to use a Python version that is NOT in the range of |
Beta Was this translation helpful? Give feedback.
-
Obviously, I did a bad job explaining my use case. Here's another try. I have
I now want to build a container for this Python project. Of course, this container includes the required Python 3.12. For buidling the container, I want to create a How can I use some flavor of
|
Beta Was this translation helpful? Give feedback.
No, the final set of packages to be installed may vary depending on which Python version are being used, think of a
foo; python_version >= '3.8'
dependency, but unfortunately,pdm export
lacks the ability to record and possibly merge all those markers to form a static requirements.txt. What it does is to read the current python used when runningexport
and tailor the dependency list to get a requirements.txt. This is becausepdm.lock
may contain too many packages not needed by the target environment. For example, a lockfile may look like the following(translated to requirements.txt format):