Re: Flatpak and __pycache__

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/29/20 3:22 PM, Kalev Lember wrote:
     >  > for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E
     > "/usr/lib(64)?/python[0-9]\.[0-9]$"`;
     >
     > ... which should use prefix instead of hardcoding /usr (or alternatively
    scan
     > both /usr and /app).

    Can do. However, one question: When we find code in /app/lib(64)/pythonX.Y, do
    we bytecompile with /usr/bin/pythonX.Y or /app/bin/pythonX.Y?


Awesome, thanks!

It depends: for python2.7 (gimp flatpak) we use python2.7 re-built for /app prefix (so it's bundled with the app's flatpak), but for regular python3 we just use the /usr-installed one that's part of the flatpak runtime (the runtime uses /usr prefix and app flatpaks use /app prefix).

Would it be possible to just use %__python2 and %__python3 macros for byte-compiling? These are always set correctly by the flatpak macros, no matter if the interpreter is in /app or /usr.

Not in the way this is currently done, no. The script detects a Python-version-specific path and uses that Python version.

E.g. even if %__python3 is set to /usr/bin/pypy3, when the script fins files in /usr/lib(64)/python3.9, it compiles them with python3.9.

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux