Packging eduMFA: How to handle the package installing things into /usr/lib/edumfa?

Dear Pythonistas, I found eduMFA recently and thought I would try to package it.
https://build.opensuse.org/package/show/home:ojkastl_buildservice:eduMFA/pyt...
Despite some obscure dependencies I got it building. Not installable yet, as I need to find out what their exact requirements are. But that is another topic. The package is built using %pyproject_wheel and installed using %pyproject_install. The thing is: I can only build it for one python flavor, as it installs things into /usr/lib/. So the multi-flavor packages conflict with each other. Before raising an issue upstream: I thought about having a "common" package required by all flavors, that contains those files from /usr/lib/edumfa. But it sounds hacky and does not feel right. I do not know if I can tweak %pyproject_install to move those files to %{python_sitelib}. So, I would be glad for ideas how this is done in other projects. If this is something I should propose upstream to fix. Or if this can be handled in the openSUSE packaging. Thanks for any input, still learning new things regarding python packaging each day... Kind Regards, Johannes

Hi, On vie, 2024-09-27 at 18:50 +0200, Johannes Kastl wrote:
Dear Pythonistas,
I found eduMFA recently and thought I would try to package it.
https://build.opensuse.org/package/show/home:ojkastl_buildservice:eduMFA/pyt...
Despite some obscure dependencies I got it building. Not installable yet, as I need to find out what their exact requirements are. But that is another topic.
The package is built using %pyproject_wheel and installed using %pyproject_install.
The thing is: I can only build it for one python flavor, as it installs things into /usr/lib/. So the multi-flavor packages conflict with each other.
Before raising an issue upstream:
I thought about having a "common" package required by all flavors, that contains those files from /usr/lib/edumfa.
But it sounds hacky and does not feel right.
I think that's the way to go when there are no python files, so it could be okay for config or shared files. But looks like there are a lot of .py files for alembic migrations that are packages like data-files
I do not know if I can tweak %pyproject_install to move those files to %{python_sitelib}.
So, I would be glad for ideas how this is done in other projects. If this is something I should propose upstream to fix. Or if this can be handled in the openSUSE packaging.
I don't know much about this project and why they put the database migrations in /usr/lib/edumfa/migrations/versions. But, if this files is something that could be imported from python code, it should go to the module. In other case, it could go to /usr/share and be part of a -common pacakge, if it's something like "doc" or to use from command line when updating the database.
Thanks for any input, still learning new things regarding python packaging each day...
Kind Regards, Johannes

Hi Daniel, On 30.09.24 10:39 daniel.garcia@suse.com wrote:
I don't know much about this project and why they put the database migrations in /usr/lib/edumfa/migrations/versions. But, if this files is something that could be imported from python code, it should go to the module. In other case, it could go to /usr/share and be part of a -common pacakge, if it's something like "doc" or to use from command line when updating the database.
Thanks for the insights, I'll get in touch with upstream and see, what they think. Kind Regards, Johannes
participants (2)
-
daniel.garcia@suse.com
-
Johannes Kastl