2021-12-08 10:07:48 +00:00
|
|
|
Name: double-install
|
|
|
|
Version: 0
|
|
|
|
Release: 0%{?dist}
|
|
|
|
Summary: Install 2 wheels
|
|
|
|
License: BSD and MIT
|
|
|
|
%global markupsafe_version 2.0.1
|
|
|
|
%global tldr_version 0.4.4
|
|
|
|
Source1: https://github.com/pallets/markupsafe/archive/%{markupsafe_version}/MarkupSafe-%{markupsafe_version}.tar.gz
|
|
|
|
Source2: %{pypi_source tldr %{tldr_version}}
|
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
|
|
|
%description
|
|
|
|
This package tests that we can build and install 2 wheels at once.
|
|
|
|
One of them is "noarch" and one has an extension module.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -Tc
|
|
|
|
tar xf %{SOURCE1}
|
|
|
|
tar xf %{SOURCE2}
|
|
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
cd markupsafe-%{markupsafe_version}
|
2022-01-14 15:26:40 +00:00
|
|
|
%pyproject_buildrequires -R
|
2021-12-08 10:07:48 +00:00
|
|
|
cd ../tldr-%{tldr_version}
|
2022-01-14 15:26:40 +00:00
|
|
|
%pyproject_buildrequires -R
|
2021-12-08 10:07:48 +00:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
cd markupsafe-%{markupsafe_version}
|
|
|
|
%pyproject_wheel
|
|
|
|
cd ../tldr-%{tldr_version}
|
|
|
|
%pyproject_wheel
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
# This should install both the wheels:
|
|
|
|
%pyproject_install
|
|
|
|
#pyproject_save_files is not possible with 2 dist-infos
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
# Internal check for the value of %%{pyproject_build_lib}
|
|
|
|
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 10
|
|
|
|
cd markupsafe-%{markupsafe_version}
|
2022-07-14 21:14:32 +00:00
|
|
|
%if 0%{?fedora} >= 37 || 0%{?rhel} >= 10
|
|
|
|
test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/markupsafe-%{markupsafe_version}/build/lib.%{python3_platform}-cpython-%{python3_version_nodots}"
|
|
|
|
%else
|
2021-12-08 10:07:48 +00:00
|
|
|
test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/markupsafe-%{markupsafe_version}/build/lib.%{python3_platform}-%{python3_version}"
|
2022-07-14 21:14:32 +00:00
|
|
|
%endif
|
2021-12-08 10:07:48 +00:00
|
|
|
cd ../tldr-%{tldr_version}
|
|
|
|
test "%{pyproject_build_lib}" == "%{_builddir}/%{buildsubdir}/tldr-%{tldr_version}/build/lib"
|
|
|
|
cd ..
|
|
|
|
%else
|
|
|
|
for dir in . markupsafe-%{markupsafe_version} tldr-%{tldr_version}; do
|
|
|
|
(cd $dir && test "%{pyproject_build_lib}" == "$(echo %{_pyproject_builddir}/pip-req-build-*/build/lib.%{python3_platform}-%{python3_version}):$(echo %{_pyproject_builddir}/pip-req-build-*/build/lib)")
|
|
|
|
done
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{_bindir}/tldr*
|
|
|
|
%pycached %{python3_sitelib}/tldr.py
|
|
|
|
%{python3_sitelib}/tldr-%{tldr_version}.dist-info/
|
|
|
|
%{python3_sitearch}/MarkupSafe-%{markupsafe_version}.dist-info/
|
|
|
|
%{python3_sitearch}/markupsafe/
|