good news Peter - indeed chatpgt created the code that modifies the path :)
Certainly! Here's the modified code snippet to consider the `--prefix` parameter for the `data_files` path you provided: # Add the following code after the setup() function if sys.argv[1] == 'install': # Retrieve the value of the --prefix parameter prefix = '' for arg in sys.argv: if arg.startswith('--prefix='): prefix = arg.split('=')[1] break # Update the paths of data_files using the --prefix parameter if prefix: new_data_files = [] for data_path, files in setup_kwargs['data_files']: new_data_path = os.path.join(prefix, data_path) new_files = [os.path.join(new_data_path, file) for file in files] new_data_files.append((new_data_path, new_files)) setup_kwargs['data_files'] = new_data_files ``` In this modified code, the `data_files` list has been directly included in the setup arguments with the appropriate paths. The rest of the code remains the same as before. Remember to pass the `--prefix` parameter when running the `setup.py` script with the `install` command to ensure the correct installation path for the data files. piątek, 26 maja 2023 o 08:21:11 UTC+2 Sebastian Tur napisał(a): > If I had a skills I would not even waste your time for reading that :) > I'm not even skilled for hello world in python but maybe I'll try chatgpt > to help me fix that. > > czw., 25 maj 2023, 21:52 użytkownik Peter Bienstman <peter.b...@gmail.com> > napisał: > >> Feel free to submit a patch for setup.py! >> >> Peter >> >> On Thu, May 25, 2023 at 9:45 PM Sebastian Tur <dpb...@gmail.com> wrote: >> >>> I did not received any help from Johannes but still I was able to do >>> some progress. >>> the issue I'm facing curently is that setup.py does not respect --prefix >>> for data_files >>> simillar to https://github.com/pypa/setuptools/issues/130 >>> >>> so I get >>> error: could not create '/usr/share/locale/ca/LC_MESSAGES/mnemosyne.mo': >>> Permission denied >>> >>> and the same for menmosyne.desktop and mnemosyne.png >>> >>> So in the end flatpak-builder is not able to prepare a package in its >>> confined dir. >>> >>> Are you able to adapt setup.py to respect --prefix ? >>> >>> wtorek, 11 kwietnia 2023 o 22:46:56 UTC+2 Sebastian Tur napisał(a): >>> >>>> That's why I mentioned Johannes:) >>>> >>>> wt., 11 kwi 2023, 22:33 użytkownik Peter Bienstman < >>>> peter.b...@gmail.com> napisał: >>>> >>>>> Btw, you created the pull request in Linuxrider's repository (which I >>>>> can't control) , not in the main Mnemosyne repository... >>>>> >>>>> Peter >>>>> >>>>> On Tue, 11 Apr 2023, 22:21 Sebastian Turzański, <dpb...@gmail.com> >>>>> wrote: >>>>> >>>>>> Hi Johannes >>>>>> I created a pull request on the gihub with update dependency URLs + >>>>>> a request for further assistance >>>>>> >>>>>> wt., 11 kwi 2023 o 15:25 Peter Bienstman <peter.b...@gmail.com> >>>>>> napisał(a): >>>>>> >>>>>>> If someone wants to act as a developer for this, I'm happy to give >>>>>>> them access to sourceforge, but it's not something that's on my own >>>>>>> todo >>>>>>> list, I'm afraid... >>>>>>> >>>>>>> Peter >>>>>>> >>>>>>> On Tue, Apr 11, 2023 at 3:24 PM Sebastian Tur <dpb...@gmail.com> >>>>>>> wrote: >>>>>>> >>>>>>>> With flathub getting more and more popular I think this is a great >>>>>>>> idea. >>>>>>>> Let's take a Steam Deck gaming console as an example. It shipps >>>>>>>> with flathub enabled KDE distro where ppl would happily use mnemosyne >>>>>>>> - for >>>>>>>> exmaple me and my kids :) >>>>>>>> >>>>>>>> piątek, 19 kwietnia 2019 o 09:08:35 UTC+2 Peter Bienstman >>>>>>>> napisał(a): >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> Nice, I didn't even know that flatpak existed. >>>>>>>>> >>>>>>>>> If you want to keep this up to date, I'd be happy to give you >>>>>>>>> access to sourceforge so that you upload new versions. Could you also >>>>>>>>> provide more detailed instructions for our website on how to use >>>>>>>>> this? >>>>>>>>> >>>>>>>>> Cheers, >>>>>>>>> >>>>>>>>> Peter >>>>>>>>> >>>>>>>>> -----Original Message----- >>>>>>>>> From: joh.hermann via mnemosyne-proj-users < >>>>>>>>> mnemosyne-...@googlegroups.com> >>>>>>>>> Sent: 18 April 2019 14:46 >>>>>>>>> To: mnemosyne-proj-users <mnemosyne-...@googlegroups.com> >>>>>>>>> Subject: [mnemosyne-proj-users] Flatpak >>>>>>>>> >>>>>>>>> Hello everyone, >>>>>>>>> >>>>>>>>> I have put together a basic flatpak manifest here: >>>>>>>>> https://github.com/linuxrider/org.mnemosyneproj.Mnemosyne >>>>>>>>> >>>>>>>>> With flatpak-builder and org.kde.Sdk//5.12 installed and after >>>>>>>>> cloning the git it should be easily installable with flatpak-builder >>>>>>>>> --user >>>>>>>>> --install --ccache build org.mnemosyneproj.Mnemosyne.yaml >>>>>>>>> >>>>>>>>> I would like to hear your opinion. >>>>>>>>> >>>>>>>>> Best regards >>>>>>>>> Johannes >>>>>>>>> >>>>>>>>> -- >>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>> Groups "mnemosyne-proj-users" group. >>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>> send an email to mnemosyne-proj-u...@googlegroups.com. >>>>>>>>> To post to this group, send email to >>>>>>>>> mnemosyne-...@googlegroups.com. >>>>>>>>> To view this discussion on the web visit >>>>>>>>> https://groups.google.com/d/msgid/mnemosyne-proj-users/72c29305-044d-4c9f-8ab5-14c92e77fb4e%40googlegroups.com. >>>>>>>>> >>>>>>>>> >>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "mnemosyne-proj-users" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to mnemosyne-proj-u...@googlegroups.com. >>>>>>>> To view this discussion on the web visit >>>>>>>> https://groups.google.com/d/msgid/mnemosyne-proj-users/1a39350e-1462-4f16-aa21-b4d6d2e6dff6n%40googlegroups.com >>>>>>>> >>>>>>>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/1a39350e-1462-4f16-aa21-b4d6d2e6dff6n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>> . >>>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to a topic in >>>>>>> the Google Groups "mnemosyne-proj-users" group. >>>>>>> To unsubscribe from this topic, visit >>>>>>> https://groups.google.com/d/topic/mnemosyne-proj-users/8DjSuqtg2nc/unsubscribe >>>>>>> . >>>>>>> To unsubscribe from this group and all its topics, send an email to >>>>>>> mnemosyne-proj-u...@googlegroups.com. >>>>>>> To view this discussion on the web visit >>>>>>> https://groups.google.com/d/msgid/mnemosyne-proj-users/CAMdxoPHO1P_ZfALDW0-bhUbQjUsm0NTmkTcx62nKDe9N4DSjFg%40mail.gmail.com >>>>>>> >>>>>>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/CAMdxoPHO1P_ZfALDW0-bhUbQjUsm0NTmkTcx62nKDe9N4DSjFg%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>>> . >>>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "mnemosyne-proj-users" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to mnemosyne-proj-u...@googlegroups.com. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/mnemosyne-proj-users/CACRhumAEysoAy_wmpJhWj-NZT8ud1oU9wEQw9340pWuWnuz%3DFQ%40mail.gmail.com >>>>>> >>>>>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/CACRhumAEysoAy_wmpJhWj-NZT8ud1oU9wEQw9340pWuWnuz%3DFQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>>>> You received this message because you are subscribed to a topic in the >>>>> Google Groups "mnemosyne-proj-users" group. >>>>> To unsubscribe from this topic, visit >>>>> https://groups.google.com/d/topic/mnemosyne-proj-users/8DjSuqtg2nc/unsubscribe >>>>> . >>>>> To unsubscribe from this group and all its topics, send an email to >>>>> mnemosyne-proj-u...@googlegroups.com. >>>>> >>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/mnemosyne-proj-users/CAMdxoPF4ggv9S9iUGd0fjmWiNLFUuWoABZmy-Zr94Ebv94Yzng%40mail.gmail.com >>>>> >>>>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/CAMdxoPF4ggv9S9iUGd0fjmWiNLFUuWoABZmy-Zr94Ebv94Yzng%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "mnemosyne-proj-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to mnemosyne-proj-u...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/mnemosyne-proj-users/8ec07444-03da-4660-8fb8-0c988aad685en%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/mnemosyne-proj-users/8ec07444-03da-4660-8fb8-0c988aad685en%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "mnemosyne-proj-users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/mnemosyne-proj-users/8DjSuqtg2nc/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> mnemosyne-proj-u...@googlegroups.com. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/mnemosyne-proj-users/CAMdxoPG2veciCzXREABD8ZNAa0xR0PuuRQLHBkQ6o%3DpCXiwU7Q%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/mnemosyne-proj-users/CAMdxoPG2veciCzXREABD8ZNAa0xR0PuuRQLHBkQ6o%3DpCXiwU7Q%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/5f3d7754-13e4-49b1-a3cb-37d9ada7dd83n%40googlegroups.com.