You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rmartin16 opened this issue
Apr 24, 2024
· 3 comments
Labels
androidThe issue relates to Android mobile support.bugA crash or error in behavior.linuxThe issue relates Linux support.webThe issue relates to supporting the web as a platform.
Output formats such as Android Gradle, Flatpak, and Web use a file named requirements.txt internal to the build process to create the distributable artifact. If a project itself defines a requirements.txt in requires, this results in infinite recursion during the build process as pip attempts to install its own requirements.txt.
Steps to reproduce
Create a requirements.txt
Add -rrequirements.txt to requires
Run briefcase build android, briefcase build linux flatpak, briefcase build web
See error
Expected behavior
Use an internal filename for requirements that is less likely to collide with a requirements file defined via pyproject.toml.
The text was updated successfully, but these errors were encountered:
rmartin16
added
bug
A crash or error in behavior.
linux
The issue relates Linux support.
android
The issue relates to Android mobile support.
web
The issue relates to supporting the web as a platform.
labels
Apr 24, 2024
It's definitely problematic that Briefcase can get into an infinite loop, but the way that is happening is definitely "off script" usage of requires. The fact that pip arguments can be passed to requires is more accident than intention.
Rather than try and make this work by using a different name for the requirements file (which, ultimately, can always fail, because no matter what name we use, you can pass that name as -r<that name> - I'd be inclined to add validation to check the values in requires to ensure that they're all valid package specifiers. If they're not, we should at least raise a warning, if not a full error. The only reason to not use an error is that it's currently useful to be able to pass in different package repositories and other install configuration options - but if we can resolve issues like #1270, then the need to support this sort of extension is minimized.
pip could certainly give a better error message in this situation, so I think this should be reported in their issue tracker, if it hasn't been already.
androidThe issue relates to Android mobile support.bugA crash or error in behavior.linuxThe issue relates Linux support.webThe issue relates to supporting the web as a platform.
Describe the bug
Output formats such as Android Gradle, Flatpak, and Web use a file named
requirements.txt
internal to the build process to create the distributable artifact. If a project itself defines arequirements.txt
inrequires
, this results in infinite recursion during the build process aspip
attempts to install its ownrequirements.txt
.Steps to reproduce
requirements.txt
-rrequirements.txt
torequires
briefcase build android
,briefcase build linux flatpak
,briefcase build web
Expected behavior
Use an internal filename for requirements that is less likely to collide with a requirements file defined via
pyproject.toml
.Screenshots
No response
Environment
0.3.18.dev229+ga1c5e9bf.d20240424
Logs
briefcase.2024_04_24-10_34_53.build.log
Additional context
No response
The text was updated successfully, but these errors were encountered: