Blame SPECS/python-trustme.spec

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