Revert "Fix search paths for /app-installed python modules" (#2026979)

The python path issue is now fixed so we can go back to using the
original code.

https://bugzilla.redhat.com/show_bug.cgi?id=2026979

This reverts commit 2a984132dc.
This commit is contained in:
Kalev Lember 2022-09-06 09:12:35 +02:00
commit cfbfef479a

View file

@ -3,6 +3,7 @@ Version: 36
Release: 2%{?dist}
Summary: Configuration files that live inside the flatpak runtime
Source1: 50-flatpak.conf
Source2: usercustomize.py
Source3: org.fedoraproject.Platform.appdata.xml
Source4: org.fedoraproject.Sdk.appdata.xml
Source5: defaults.json.in
@ -31,17 +32,10 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
install -t $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d -p -m 0644 %{SOURCE1}
# usercustomize.py to set up Python paths
mkdir -p $RPM_BUILD_ROOT%{python3_sitelib}
cat > $RPM_BUILD_ROOT%{python3_sitelib}/usercustomize.py <<EOF
import site
%define _prefix /app
site.addsitedir("%{python3_sitelib}")
%if "%{python3_sitelib}" != "%{python3_sitearch}"
site.addsitedir("%{python3_sitearch}")
%endif
%undefine _prefix
EOF
for d in %{python3_sitelib} ; do
mkdir -p $RPM_BUILD_ROOT/$d
install -t $RPM_BUILD_ROOT/$d -m 0644 %{SOURCE2}
done
# Install appdata for both the Platform and the Sdk
mkdir -p $RPM_BUILD_ROOT%{_datadir}/metainfo
@ -94,6 +88,7 @@ HOME=/root /usr/bin/fc-cache -s
%changelog
* Tue Sep 06 2022 Kalev Lember <klember@redhat.com> - 36-2
- Correctly substitute /app/lib in flatpak-builder defaults.json ldflags
- Revert "Fix search paths for /app-installed python modules" (#2026979)
* Thu Aug 04 2022 Kalev Lember <klember@redhat.com> - 36-2
- Fix search paths for /app-installed python modules (#2112499)