#5 Fix flatpak build
Merged 2 months ago by bpostle. Opened 2 months ago by yselkowitz.
rpms/ yselkowitz/hugin rawhide  into  rawhide

file modified
+6
@@ -47,6 +47,12 @@ 

  %install

  %cmake_install

  

+ %if 0%{?flatpak}

+ # pyinstalldir is not configurable

+ mkdir -p %{buildroot}%{python3_sitearch}

+ mv %{buildroot}%{_usr}/%{_lib}/python%{python3_version}/site-packages/* %{buildroot}%{python3_sitearch}

+ %endif

+ 

  desktop-file-install --vendor="" --delete-original \

    --dir=%{buildroot}/%{_datadir}/applications \

    %{buildroot}/%{_datadir}/applications/%{name}.desktop

pyinstalldir is determined by distutils.sysconfig.get_python_lib, which besides being deprecated, is incorrect for flatpaks because it points to the runtime location in /usr rather than to CMAKE_INSTALL_PREFIX (/app). Since no means is provided to configure this location, simply move the files to the correct location in this case.

Pull-Request has been merged by bpostle

2 months ago
Metadata