Multiple Apps #1888
Replies: 3 comments 3 replies
-
|
If the dependency is common to all app on all platforms, you can include the requirement in the project-level If the dependency is linux specific, but shouldn't be used on macOS/Windows, there's no "across all apps, on linux" section where you can put a declaration. That might be worth exploring as a feature; the question would be the exact resolution order (i.e., do platform level declarations come before or after app level declarations?) However, there is another option: you can use PEP508 install qualifiers in the app-level section. For example: This would install Pillow 9.3.0 on Linux, but Pillow 9.2.0 on macOS. You can use any of the qualifiers here (so, for example, you can gate installation on the Python version to install a backwards compatibility shim like The only complication with this is that |
Beta Was this translation helpful? Give feedback.
-
|
Hi I am trying to create a multi app project too. My main motivation for doing that is both apps share many functions I have written. I am hoping by putting them in a single project I can reference the same module for both apps. However, I am not sure where to put the shared library in the briefcase folder structure. I tried doing this: In my code myapp1/app.py I tried importing shared libs as so
But I am getting this error when i run briefcase dev what is the correct way to share a module between two apps in a single project? Thanks |
Beta Was this translation helpful? Give feedback.
-
|
Thanks so much! It worked! I included "src/shared_libs" as one of my sources in the pyproject.toml file. Now I can import the library in my app. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I decided to convert a project to multiple apps in order to share some GUI base classes. It works great!
When it comes to the pyproject.toml, I found that I had to copy out all of the entries like
[tool.briefcase.app.firstapp.linux.system.suse]and repeat them with[tool.briefcase.app.secondapp.linux.system.suse]etc. Is there anyway to avoid this repetition and declare that all of the apps have the same briefcase dependencies?Beta Was this translation helpful? Give feedback.
All reactions