-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Formatting error in pyproject.toml for GUI backends PySide2/None #405
Comments
Thanks for the report! Confirmed you've found a bug. Your diagnosis looks completely correct to me; the only piece you've missed is that Briefcase (as of v0.3) uses the v0.3 branch of the briefcase-template repository. There's been at least 2 recent changes to that file - one of which was exactly in the area you've described (between the requirements for Linux and the Windows section). Let me know if you're interested in working on a fix for this; if I don't hear from you in a day or two, I'll assume your not and I'll tag it for others to look at. |
Ah, I was only looking at the master branch! Uh, I'm not sure my briefcase is actually using that template branch though. One of the recent changes added "PursuedPyBear" to the list of GUI options you can choose when starting a new project, but I only get asked to choose from Toga/PySide2/None. Do you get different (better) behavour from briefcase 0.3.0? |
I would like to take a stab at fixing this. That said, I still need to work out where the fix goes. Maybe reading up on how to create cookiecutters will help me there. |
Unfortunately not - that's the subject of #392. At present, the list of supported platforms is hard coded. Once #392 is fixed, PursuedPyBear should automatically appear in the list of options. As for fixing this bug: Cookiecutter is a (Python installable) tool for taking a collection of Jinja templates, and rolling them out into a full directory structure. Metadata for the template is declared in the My suggestion here would be to fork & clone the briefcase-template repo, and then point cookiecutter at your local copy of the template; Tweak the template, then rerun. Rinse and repeat until the template does the right thing :-) |
Oh - and if you need any more pointers or background, ask away - either here, or in our chat room! |
I'll go ahead and close this issue, now that beeware/briefcase-template#18 has been merged in. |
Description
When I run the briefcase tutorial example, there's a formatting error in the generated
pyproject.toml
. This formatting error means the next step in the tutorial (thebriefcase dev
command) will not run.Version numbers
Note: I think this issue is new with briefcase version 0.3.0? I was using it last month-ish and didn't see the same problem until I updated briefcase today.
How to reproduce
Select the default for every question, EXCEPT when asked to select the GUI backend.
Choose either "[2] PySide2" or "[3] None" for this question.
Observe the failure when running
briefcase dev
The error message is:
Suggested fix
It seems like the only problem is two missing
\n
characters inpyproject.toml
that should make a line break before[tool.briefcase.app.helloworld.windows]
.If I edit the file and insert the newlines myself, this fixes my problem and
briefcase dev
will run.Here's the relevant part of
pyproject.toml
:The thing is, I'm not quite sure where
pyproject.toml
is being written.The
briefcase/commands/new.py
file pulls in the briefcase-template cookiecutter. That setup.py file seems like the closest thing.But there haven't been any changes to this repo since last year, and the formatting in setup.py looks ok to me. Any tips?
The text was updated successfully, but these errors were encountered: