# This package is required by python-build to build wheels. # To bootstrap, we copy the files to appropriate locations manually and create a minimal dist-info metadata. # Note that as a pure Python package, the wheel contains no pre-built binary stuff. %bcond_without bootstrap %{?mingw_package_header} %global pypi_name pep517 Name: mingw-python-%{pypi_name} Summary: MinGW Windows Python %{pypi_name} library Version: 0.13.0 Release: 5%{?dist} BuildArch: noarch # ./pep517/colorlog.py is Apache-2.0, rest is MIT License: MIT AND Apache-2.0 URL: https://pypi.python.org/pypi/%{pypi_name} Source0: %{pypi_source %{pypi_name} %{version}} BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-python3 %if %{without bootstrap} BuildRequires: mingw32-python3-build %endif BuildRequires: mingw64-filesystem >= 95 BuildRequires: mingw64-python3 %if %{without bootstrap} BuildRequires: mingw64-python3-build %endif %description MinGW Windows Python %{pypi_name} library. %package -n mingw32-python3-%{pypi_name} Summary: MinGW Windows Python3 %{pypi_name} library %if %{with bootstrap} Requires: mingw32-python3-flit-core %endif %description -n mingw32-python3-%{pypi_name} MinGW Windows Python3 %{pypi_name} library. %package -n mingw64-python3-%{pypi_name} Summary: MinGW Windows Python3 %{pypi_name} library %if %{with bootstrap} Requires: mingw64-python3-flit-core %endif %description -n mingw64-python3-%{pypi_name} MinGW Windows Python3 %{pypi_name} library. %prep %autosetup -p1 -n %{pypi_name}-%{version} %build %if %{with bootstrap} %global distinfo %{pypi_name}-%{version}+rpmbootstrap.dist-info mkdir %{distinfo} cat > %{distinfo}/METADATA << EOF Metadata-Version: 2.2 Name: %{pypi_name} Version: %{version}+rpmbootstrap EOF %else %global distinfo %{pypi_name}-%{version}.dist-info %mingw32_py3_build_wheel %mingw64_py3_build_wheel %mingw32_py3_build_host_wheel %mingw64_py3_build_host_wheel %endif %install %if %{with bootstrap} mkdir -p %{buildroot}%{mingw32_python3_sitearch} mkdir -p %{buildroot}%{mingw64_python3_sitearch} cp -a pep517 %{distinfo} %{buildroot}%{mingw32_python3_sitearch}/ cp -a pep517 %{distinfo} %{buildroot}%{mingw64_python3_sitearch}/ mkdir -p %{buildroot}%{mingw32_python3_hostsitearch} mkdir -p %{buildroot}%{mingw64_python3_hostsitearch} cp -a pep517 %{distinfo} %{buildroot}%{mingw32_python3_hostsitearch}/ cp -a pep517 %{distinfo} %{buildroot}%{mingw64_python3_hostsitearch}/ %else %mingw32_py3_install_wheel %mingw64_py3_install_wheel %mingw32_py3_install_host_wheel %mingw64_py3_install_host_wheel %endif %files -n mingw32-python3-%{pypi_name} %license LICENSE %{mingw32_python3_sitearch}/%{pypi_name}/ %{mingw32_python3_sitearch}/%{distinfo} %{mingw32_python3_hostsitearch}/%{pypi_name}/ %{mingw32_python3_hostsitearch}/%{distinfo} %files -n mingw64-python3-%{pypi_name} %license LICENSE %{mingw64_python3_sitearch}/%{pypi_name}/ %{mingw64_python3_sitearch}/%{distinfo} %{mingw64_python3_hostsitearch}/%{pypi_name}/ %{mingw64_python3_hostsitearch}/%{distinfo} %changelog * Thu Jan 19 2023 Fedora Release Engineering - 0.13.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Oct 31 2022 Sandro Mani - 0.13.0-4 - Full build * Mon Oct 31 2022 Sandro Mani - 0.13.0-3 - Explicit requires: flit-core for bootstrap build * Fri Oct 21 2022 Sandro Mani - 0.13.0-2 - License is MIT AND Apache-2.0 * Tue Sep 27 2022 Sandro Mani - 0.12.0-1 - Initial build