Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more helpful when pyproject.toml is missing #240

Merged
merged 3 commits into from
Jan 6, 2021
Merged

Be more helpful when pyproject.toml is missing #240

merged 3 commits into from
Jan 6, 2021

Conversation

nbraud
Copy link
Collaborator

@nbraud nbraud commented Jan 4, 2021

  • Emit an error referring to PEP 517 and to the buildsystem's documentation.
  • When the setup.py style is detected, suggest a basic pyproject.toml.
  • Improve bork's error display, to ensure error messages aren't pushed off-screen by a backtrace.

@nbraud
Copy link
Collaborator Author

nbraud commented Jan 4, 2021

I'm very sorry for how the setuptools error message is laid out, I just couldn't find a way to both:

  • have it be readable in the console (esp. with the code block indented) ;
  • have it be readable in the source code ;
  • have it be indented in a Pythonic way.

@duckinator
Copy link
Owner

This looks good to me. The indentation weirdness is basically expected unless you use textwrap.dedent, but that might be overkill.

Do you want to try to figure out improving the error display here, or defer that to a follow-up PR?

If you're okay with this as-is, I'm okay with it being merged (as long as an issue exists about improving error output). If you want to work on it more first, lmk if you need help/feedback/someone to bounce ideas off. 👍

@nbraud
Copy link
Collaborator Author

nbraud commented Jan 6, 2021

Do you want to try to figure out improving the error display here, or defer that to a follow-up PR?

If you're okay with this as-is, I'm okay with it being merged (as long as an issue exists about improving error output). If you want to work on it more first, lmk if you need help/feedback/someone to bounce ideas off. +1

I'm not sure TBH? Maybe let's merge this and make an issue to bounce ideas in?

I'm honestly very unsure how to do this, what the end result should look, ...

@nbraud
Copy link
Collaborator Author

nbraud commented Jan 6, 2021

bors r=duckinator

@bors
Copy link
Contributor

bors bot commented Jan 6, 2021

Build succeeded:

@bors bors bot merged commit e0ce3b3 into master Jan 6, 2021
@bors bors bot deleted the no-pyproject branch January 6, 2021 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants