-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
area/cliRelated to the command lineRelated to the command linekind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/acceptedFeature request accepted for the roadmapFeature request accepted for the roadmap
Description
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: Ubuntu 18.04.5 LTS / WSL 2
- Poetry version: 1.1.4
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/tueda/7d970d66245106352ce56d3f5edb5fc3
Issue
If I use the "build.py" feature without generating setup.py (though it has not been stabilized yet, #2740), namely,
[tool.poetry.build]
script = "build.py"
generate-setup-file = falsethen poetry install gives a zero exit status even when build.py failed:
$ cat build.py
raise AssertionError("Failed!")
$ poetry install -vvv; echo $?
...
Installing the current project: example (0.1.0)
- Building package example in editable mode
- Executing build script: build.py
Traceback (most recent call last):
File "/home/tueda/tmp/test-poetry-build-failure/build.py", line 1, in <module>
raise AssertionError("Failed!")
AssertionError: Failed!
- Adding example.pth to /home/tueda/tmp/test-poetry-build-failure/.venv/lib/python3.9/site-packages for /home/tueda/tmp/test-poetry-build-failure
- Removing existing example-0.1.0.dist-info directory from /home/tueda/tmp/test-poetry-build-failure/.venv/lib/python3.9/site-packages
- Adding the example-0.1.0.dist-info directory to /home/tueda/tmp/test-poetry-build-failure/.venv/lib/python3.9/site-packages
0
The same thing occurs even when build.py does not exist:
$ cat build.py
cat: build.py: No such file or directory
$ poetry install -vvv; echo $?
...
Installing the current project: example (0.1.0)
- Building package example in editable mode
- Executing build script: build.py
/home/tueda/tmp/test-poetry-build-failure/.venv/bin/python: can't open file '/home/tueda/tmp/test-poetry-build-failure/build.py': [Errno 2] No such file or directory
- Adding example.pth to /home/tueda/tmp/test-poetry-build-failure/.venv/lib/python3.9/site-packages for /home/tueda/tmp/test-poetry-build-failure
- Removing existing example-0.1.0.dist-info directory from /home/tueda/tmp/test-poetry-build-failure/.venv/lib/python3.9/site-packages
- Adding the example-0.1.0.dist-info directory to /home/tueda/tmp/test-poetry-build-failure/.venv/lib/python3.9/site-packages
0
In these cases, Poetry should report a build error with returning a non-zero exit status.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/cliRelated to the command lineRelated to the command linekind/bugSomething isn't working as expectedSomething isn't working as expectedstatus/acceptedFeature request accepted for the roadmapFeature request accepted for the roadmap