Blame SPECS/python-trustme.spec

214110
%global srcname trustme
214110
%global common_description %{expand:
214110
You wrote a cool network client or server.  It encrypts connections using TLS.
214110
Your test suite needs to make TLS connections to itself.  Uh oh.  Your test
214110
suite probably doesn't have a valid TLS certificate.  Now what?  trustme is a
214110
tiny Python package that does one thing: it gives you a fake certificate
214110
authority (CA) that you can use to generate fake TLS certs to use in your
214110
tests.  Well, technically they are real certs, they are just signed by your CA,
214110
which nobody trusts.  But you can trust it.  Trust me.}
214110
214110
%bcond_without  tests
214110
%bcond_without  docs
214110
214110
214110
Name:           python-%{srcname}
214110
Version:        0.8.0
214110
Release:        1%{?dist}
214110
Summary:        #1 quality TLS certs while you wait, for the discerning tester
214110
License:        MIT or ASL 2.0
214110
URL:            https://github.com/python-trio/trustme
214110
Source0:        %pypi_source
214110
BuildArch:      noarch
214110
214110
214110
%description %{common_description}
214110
214110
214110
%package -n python3-%{srcname}
214110
Summary:        %{summary}
214110
BuildRequires:  python3-devel
214110
BuildRequires:  pyproject-rpm-macros
214110
%if %{with tests}
214110
BuildRequires:  %{py3_dist pytest pyopenssl service-identity}
214110
%endif
214110
214110
214110
%description -n python3-%{srcname} %{common_description}
214110
214110
214110
%if %{with docs}
214110
%package -n python-%{srcname}-doc
214110
Summary:        Documentation for %{name}
214110
BuildRequires:  %{py3_dist sphinx sphinxcontrib-trio}
214110
214110
214110
%description -n python-%{srcname}-doc
214110
Documentation for %{name}.
214110
%endif
214110
214110
214110
%prep
214110
%autosetup -n %{srcname}-%{version}
214110
214110
214110
%generate_buildrequires
214110
%pyproject_buildrequires -r
214110
214110
214110
%build
214110
%pyproject_wheel
214110
214110
%if %{with docs}
214110
sphinx-build-3 docs/source html
214110
%endif
214110
214110
214110
%install
214110
%pyproject_install
214110
%pyproject_save_files %{srcname}
214110
214110
214110
%if %{with tests}
214110
%check
214110
%if %{defined el8}
214110
# The upstream test suite uses cryptography's rfc4514_string method, which
214110
# wasn't added until version 2.5.  RHEL 8 currently only provides version 2.3.
214110
# https://cryptography.io/en/latest/changelog/?highlight=rfc4514_string#v2-5
214110
%pytest --verbose -k "not (test_ca_custom_names or test_issue_cert_custom_names)"
214110
%else
214110
%pytest --verbose
214110
%endif
214110
%endif
214110
214110
214110
%files -n python3-%{srcname} -f %{pyproject_files}
214110
%license LICENSE LICENSE.MIT LICENSE.APACHE2
214110
%doc README.rst
214110
214110
214110
%if %{with docs}
214110
%files -n python-%{srcname}-doc
214110
%license LICENSE LICENSE.MIT LICENSE.APACHE2
214110
%doc html
214110
%endif
214110
214110
214110
%changelog
214110
* Sat Jul 24 2021 Carl George <carl@george.computer> - 0.8.0-1
214110
- Latest upstream
214110
- Resolves: rhbz#1969634
214110
214110
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.7.0-2
214110
- Rebuilt for Python 3.10
214110
214110
* Fri Mar 19 2021 Charalampos Stratakis <cstratak@redhat.com> - 0.7.0-1
214110
- Update to 0.7.0 (rhbz#1927133)
214110
214110
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-6
214110
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
214110
214110
* Sat Nov 14 2020 Carl George <carl@george.computer> - 0.6.0-5
214110
- Add doc subpackage
214110
214110
* Wed Oct 07 2020 Carl George <carl@george.computer> - 0.6.0-4
214110
- Remove explicit run time requires in favor of automatically generated ones
214110
214110
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
214110
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
214110
214110
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-2
214110
- Rebuilt for Python 3.9
214110
214110
* Tue Mar 17 2020 Carl George <carl@george.computer> - 0.6.0-1
214110
- Latest upstream
214110
214110
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-5
214110
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
214110
214110
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.5.2-4
214110
- Rebuilt for Python 3.8.0rc1 (#1748018)
214110
214110
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.5.2-3
214110
- Rebuilt for Python 3.8
214110
214110
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-2
214110
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
214110
214110
* Mon Jun 10 2019 Carl George <carl@george.computer> - 0.5.2-1
214110
- Latest upstream
214110
214110
* Tue Apr 16 2019 Carl George <carl@george.computer> - 0.5.1-1
214110
- Latest upstream
214110
214110
* Fri Feb 22 2019 Carl George <carl@george.computer> - 0.5.0-1
214110
- Latest upstream
214110
214110
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-2
214110
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
214110
214110
* Thu Sep 13 2018 Carl George <carl@george.computer> - 0.4.0-1
214110
- Initial package