python-rpm-generators/pythondist.attr
Kalev Lember 47a0b37ac0 Generate provides for /app-installed flatpak builds
The generator deliberately does not use %{_prefix} in order to avoid
generating provides for packages that set a custom prefix. This is done
to ensure that provides are only generated for paths where the Python
interpreter actually loads modules from.

As we can't use %{_prefix} (which would make it all much simpler), this
commit adds a conditional to look in /app only when the %flatpak macro
is defined, and /usr otherwise.

This should fix provides generation for /app-installed flatpak builds.
2023-04-20 04:23:47 +02:00

4 lines
610 B
Plaintext

%__pythondist_provides %{_rpmconfigdir}/pythondistdeps.py --provides --normalized-names-format pep503 --package-name %{name} --majorver-provides-versions %{__default_python3_version} %{?!_python_dist_allow_version_zero:--fail-if-zero}
%__pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires --normalized-names-format pep503 --package-name %{name} %{?!_python_no_extras_requires:--require-extras-subpackages} --console-scripts-nodep-setuptools-since 3.10
%__pythondist_path ^%{?!flatpak:/usr}%{?flatpak:/app}/lib(64)?/python[3-9]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$