I use CICD tools based on poetry to publish python packages to an internal PyPI. I have no control of the CICD tools, which is based on docker with python 3.6. However, due to the language features used in the package to be published, it is compatible only with python 3.8 or higher.
In the pyproject.toml, if I specify
[tool.poetry.dependencies]
python = "^3.8"
I would get a NoCompatiblePythonVersionFound error from poetry, which I understand, as the docker has only python 3.6. However, I do not need the package/any codes to run in this docker -- I just need to upload it. The environment which I use this package is on python 3.8.
If I release the python version restriction in pyproject.toml, the poetry publish works, but I cannot mark the package as requires python 3.8 or above. The package would be able to be installed but does not work with a lower version.
The question is, is it possible to use poetry running with python 3.6 to publish a package which is specified to be compatible with python 3.8 or higher?