Search code examples
pythonpython-packagingpython-poetry

how to specify setuptools version during build time


I am managing my dependencies using poetry and set

[build-system]
requires = [
"setuptools > =49.0.1",
"wheel",

However this does not seem to be working. I am still getting no matching distribution found for setuptools >= 40.8.0 during build time for one of my package.

My build.sh file looks like

release(){
   export TTOX_PARALLEL_NO_SPINNER=1
   poetry installl
   ****
}

the no matching distribution error pops up while poetry install is working, so maybe there is a way to specify setuptool version for poetry install?


Solution

  • As far as I know, Poetry does not allow using a different build back-end than poetry-core, meaning that you would not be allowed to use setuptools in the [build-system] section. But I am not 100% sure, you might want to ask the Poetry maintainers directly.

    You have this in your question: setuptools > =49.0.1. This seems incorrect to me, there should be no empty space between > and =. If I were you I would replace with setuptools>=49.0.1.