Build command ignored if poetry.lock or pyproject.toml specifies poetry

It seems if I use poetry as my build framework then I can’t seem to override the “build command”. I’ve tried putting “poetry install --no-root” and “bash” with custom shell script but neither gets executed and the log always says something along the lines of:

Success: Finished cloning repository files
Detected the following tools from environment: [email protected], [email protected], [email protected]
Installing project dependencies: poetry install

Is there any way to run custom build commands when using a python project with poetry?

Build comes after install. You need dependencies before you can build

You’d need to look further down. Are you seeing actual problems?
Please send the whole log

Thanks for your help. My project doesn’t have a “root” as poetry calls it. So it needs to be installed using “poetry install --no-root”. So the install command fails with:

10:48:08.549	Cloning repository...
10:48:09.760	From ****
10:48:09.761	 * branch            3715f5bfbdc32ff0b7f98a5a9be95b113546dcdc -> FETCH_HEAD
10:48:09.819	HEAD is now at 3715f5b add no root option
10:48:09.965	Success: Finished cloning repository files
10:48:10.746	Detected the following tools from environment: [email protected], [email protected], [email protected]
10:48:10.747	Installing project dependencies: poetry install
10:48:11.935	Creating virtualenv simple-game-VmB9M1Nz-py3.11 in /opt/buildhome/.cache/pypoetry/virtualenvs
10:48:13.884	Installing dependencies from lock file
10:48:14.029	Package operations: 23 installs, 0 updates, 0 removals
10:48:14.029	  • Installing ...
10:48:18.704	/opt/buildhome/repo/**** does not contain any element
10:48:18.837	Error: Exit with error code: 1
10:48:18.838	    at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
10:48:18.838	    at Object.onceWrapper (node:events:652:26)
10:48:18.838	    at ChildProcess.emit (node:events:537:28)
10:48:18.838	    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
10:48:18.848	Failed: build command exited with code: 1
10:48:19.732	Failed: error occurred while running build command

Actually I think i can just specify an empty packages list in my pyproject.toml and this resolves the issue.