Hey. It would be nice if dh-python could automatically get the minimum required Python version from the requires-python field in pyproject.toml (if that is used for building) and use it for versioned Depends:. I know there's X-Python3-Version and also DEBPYTHON3_SUPPORTED and DEBPYTHON3_DEFAULT (but TBH I don't know the difference between them and which one should be used - the documentation is very sparse on that). Thanks, Philippe.
Hi Philippe > It would be nice if dh-python could automatically get the minimum > required Python version from the requires-python field in > pyproject.toml (if that is used for building) and use it for versioned > Depends:. If a versioned dependency on Python is needed, it usually needs to be in place before building the package (it would often result in FTBFS with the incompatible Python version) - it therefore needs to be in the Build-Depends, not the Depends field. (As a general rule, we also want to avoid such dependencies as much as possible because they make Python interpreter transitions harder.) regards Stuart
Hey Stuart. May I ask why this is the case? I mean is the actual Python code executed during the build? In my case, the Python code I'm packaging is simply using some newer language features, so I wanted a way that people that potentially build and/or install the package see early hat it won't work with their stone-aged Python interpreter. ;-) Thanks, Philippe