# what it's called on pypi
%global srcname python-multipart
# what it's imported as
%global libname multipart
# package name fragment
%global pkgname %{libname}
%global common_description %{expand:
python-multipart is an Apache2 licensed streaming multipart parser for Python.}
Name: python-%{pkgname}
Version: 0.0.5
Release: 14%{?dist}
Summary: A streaming multipart parser for Python
License: ASL 2.0
URL: https://github.com/andrew-d/python-multipart
Source0: %pypi_source
# https://github.com/andrew-d/python-multipart/pull/18
Patch0: use-standard-library-mock-when-available.patch
BuildArch: noarch
%description %{common_description}
%package -n python3-%{pkgname}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: %{py3_dist pytest pyyaml}
%description -n python3-%{pkgname} %{common_description}
%prep
%autosetup -n %{srcname}-%{version} -p 1
# https://github.com/andrew-d/python-multipart/issues/41
sed -e 's/yaml\.load/yaml.safe_load/' -i multipart/tests/test_multipart.py
%generate_buildrequires
%pyproject_buildrequires -r
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files %{libname}
%check
%pytest
%files -n python3-%{pkgname} -f %{pyproject_files}
%doc README.rst
%changelog
* Wed Jan 26 2022 Carl George <carl@george.computer> - 0.0.5-14
- Fix FTBFS rhbz#2046037
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.0.5-11
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.0.5-8
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.0.5-6
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.0.5-5
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Oct 15 2018 Carl George <carl@george.computer> - 0.0.5-2
- Only build python2 subpackage on RHEL
* Sun Oct 14 2018 Carl George <carl@george.computer> - 0.0.5-1
- Initial package