a6d03e7
%{?mingw_package_header}
a6d03e7
a6d03e7
%global pkgname lxml
4824f9c
%global pypi_name %{pkgname}
a6d03e7
a6d03e7
Name:          mingw-python-%{pkgname}
a6d03e7
Summary:       MinGW Windows Python %{pkgname} library
f43fe68
Version:       4.6.5
f43fe68
Release:       1%{?dist}
a6d03e7
BuildArch:     noarch
a6d03e7
a6d03e7
License:       BSD
a6d03e7
URL:           https://lxml.de/
4824f9c
Source0:       %{pypi_source}
a6d03e7
# Don't attempt to link against librt
a6d03e7
Patch0:        lxml-rt.patch
a6d03e7
a6d03e7
BuildRequires: libxslt-devel
a6d03e7
a6d03e7
BuildRequires: mingw32-filesystem >= 95
a6d03e7
BuildRequires: mingw32-gcc
a6d03e7
BuildRequires: mingw32-libxml2
a6d03e7
BuildRequires: mingw32-libxslt
a6d03e7
BuildRequires: mingw32-python3
a6d03e7
BuildRequires: mingw32-python3-Cython
a6d03e7
BuildRequires: mingw32-python3-setuptools
a6d03e7
a6d03e7
BuildRequires: mingw64-filesystem >= 95
a6d03e7
BuildRequires: mingw64-gcc
a6d03e7
BuildRequires: mingw64-libxml2
a6d03e7
BuildRequires: mingw64-libxslt
a6d03e7
BuildRequires: mingw64-python3
a6d03e7
BuildRequires: mingw64-python3-Cython
a6d03e7
BuildRequires: mingw64-python3-setuptools
a6d03e7
a6d03e7
a6d03e7
%description
a6d03e7
MinGW Windows Python %{pkgname} library.
a6d03e7
a6d03e7
a6d03e7
%package -n mingw32-python3-%{pkgname}
a6d03e7
Summary:       MinGW Windows Python3 %{pkgname} library
a6d03e7
a6d03e7
%description -n mingw32-python3-%{pkgname}
a6d03e7
MinGW Windows Python3 %{pkgname} library.
a6d03e7
a6d03e7
a6d03e7
%package -n mingw64-python3-%{pkgname}
a6d03e7
Summary:       MinGW Windows Python3 %{pkgname} library
a6d03e7
a6d03e7
%description -n mingw64-python3-%{pkgname}
a6d03e7
MinGW Windows Python3 %{pkgname} library.
a6d03e7
a6d03e7
a6d03e7
%prep
4824f9c
%autosetup -p1 -n %{pypi_name}-%{version}
a6d03e7
a6d03e7
a6d03e7
%build
a6d03e7
%{mingw32_py3_build}
a6d03e7
%{mingw64_py3_build}
a6d03e7
a6d03e7
a6d03e7
%install
a6d03e7
%{mingw32_py3_install}
a6d03e7
%{mingw64_py3_install}
a6d03e7
a6d03e7
# Exclude debug files from the main files (note: the debug files are only created after %%install, so we can't search for them directly)
a6d03e7
find %{buildroot}%{mingw32_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw32-python3-%{pkgname}.debugfiles
a6d03e7
find %{buildroot}%{mingw64_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw64-python3-%{pkgname}.debugfiles
a6d03e7
a6d03e7
%files -n mingw32-python3-%{pkgname} -f mingw32-python3-%{pkgname}.debugfiles
a6d03e7
%license LICENSES.txt
a6d03e7
%{mingw32_python3_sitearch}/%{pkgname}/
4824f9c
%{mingw32_python3_sitearch}/%{pypi_name}-%{version}-py%{mingw32_python3_version}.egg-info/
a6d03e7
a6d03e7
%files -n mingw64-python3-%{pkgname} -f mingw64-python3-%{pkgname}.debugfiles
a6d03e7
%license LICENSES.txt
a6d03e7
%{mingw64_python3_sitearch}/%{pkgname}/
4824f9c
%{mingw64_python3_sitearch}/%{pypi_name}-%{version}-py%{mingw64_python3_version}.egg-info/
a6d03e7
a6d03e7
a6d03e7
%changelog
f43fe68
* Sat Dec 18 2021 Sandro Mani <manisandro@gmail.com> - 4.6.5-1
f43fe68
- Update to 4.6.5
f43fe68
95d3719
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.3-3
95d3719
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
95d3719
d045282
* Fri Jun 11 2021 Sandro Mani <manisandro@gmail.com> - 4.6.3-2
d045282
- Rebuild (python-3.10)
d045282
b7ba7be
* Wed May 26 2021 Sandro Mani <manisandro@gmail.com> - 4.6.3-1
b7ba7be
- Update to 4.6.3
b7ba7be
788024e
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.2-2
788024e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
788024e
29df87d
* Thu Dec 03 2020 Sandro Mani <manisandro@gmail.com> - 4.6.2-1
29df87d
- Update to 4.6.2
29df87d
a6d03e7
* Tue Sep 22 2020 Sandro Mani <manisandro@gmail.com> - 4.5.1-1
a6d03e7
- Update to 4.5.1
a6d03e7
- Exclude debug files in main package
a6d03e7
a6d03e7
* Tue Jun 02 2020 Sandro Mani <manisandro@gmail.com> - 4.4.1-2
a6d03e7
- Rebuild (python-3.9)
a6d03e7
a6d03e7
* Wed Nov 20 2019 Sandro Mani <manisandro@gmail.com> - 4.4.1-1
a6d03e7
- Update to 4.4.1