%global pypi_name accept-types
%global pypi_version 0.4.1
%global commit cb2531768689478737e4a8454def6a60575424e3
%global shortcommit %(c=%{commit}; echo ${c:0:12})
%global owner tim_heap
Name: python-%{pypi_name}
Version: %{pypi_version}
Release: 6%{?dist}
Summary: Use the correct accept type for an HTTP request
License: MIT
URL: https://bitbucket.org/%{owner}/%{name}
# The pypi source has the test suite stripped out :/
Source0: %{URL}/get/%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
%global desc \
accept-types helps your application respond to a HTTP request in a way \
that a client prefers. The Accept header of an HTTP request informs the \
server which MIME types the client is expecting back from this request, \
with weighting to indicate the most prefered. If your server can respond \
in multiple formats (e.g.: JSON, XML, HTML), the client can easily tell \
your server which is the prefered format without resorting to hacks like \
'&format=json' on the end of query strings.
%description
%{desc}
%package -n python3-%{pypi_name}
Summary: %{summary}
%description -n python3-%{pypi_name}
%{desc}
%prep
%autosetup -p1 -n %{owner}-%{name}-%{shortcommit}
%generate_buildrequires
%pyproject_buildrequires -t
%build
%pyproject_wheel
%check
%tox
%install
%pyproject_install
%pyproject_save_files accept_types
%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%changelog
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.4.1-4
- Rebuilt for Python 3.11
* Tue Mar 15 2022 Paul Wouters <paul.wouters@aiven.io> - 0.4.1-3
- Resolves: rhbz#2050434 python-accept-types
- Fix license, description and summary, cleanup BuildRequires:
* Mon Feb 07 2022 Paul Wouters <paul.wouters@aiven.io> - 0.4.1-2
- Use latest python macros
* Thu Feb 03 2022 Paul Wouters <paul.wouters@aiven.io> - 0.4.1-1
- Initial package.