From fc1aaa80d2a1f716b5e4c91ba4fe299741fe61b8 Mon Sep 17 00:00:00 2001 From: Carl George Date: Mon, 17 Sep 2018 11:26:05 -0500 Subject: [PATCH] Initial import (#1628614) --- .gitignore | 1 + README.md | 3 -- python-trustme.spec | 82 +++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 python-trustme.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e285226 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +trustme-*.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 4e8ecf4..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-trustme - -The python-trustme package \ No newline at end of file diff --git a/python-trustme.spec b/python-trustme.spec new file mode 100644 index 0000000..119e87f --- /dev/null +++ b/python-trustme.spec @@ -0,0 +1,82 @@ +# what it's called on pypi +%global srcname trustme +# what it's imported as +%global libname trustme +# name of egg info directory +%global eggname trustme +# package name fragment +%global pkgname trustme + +%global _description \ +You wrote a cool network client or server. It encrypts connections using TLS.\ +Your test suite needs to make TLS connections to itself. Uh oh. Your test\ +suite probably doesn't have a valid TLS certificate. Now what? trustme is a\ +tiny Python package that does one thing: it gives you a fake certificate\ +authority (CA) that you can use to generate fake TLS certs to use in your\ +tests. Well, technically they are real certs, they are just signed by your CA,\ +which nobody trusts. But you can trust it. Trust me. + +%bcond_without tests + + +Name: python-%{pkgname} +Version: 0.4.0 +Release: 1%{?dist} +Summary: #1 quality TLS certs while you wait, for the discerning tester +License: MIT or ASL 2.0 +URL: https://github.com/python-trio/trustme +Source0: %pypi_source +BuildArch: noarch + + +%description %{_description} + + +%package -n python%{python3_pkgversion}-%{pkgname} +Summary: %{summary} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +%if %{with tests} +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-pyOpenSSL +BuildRequires: python%{python3_pkgversion}-service-identity +BuildRequires: python%{python3_pkgversion}-cryptography +BuildRequires: python%{python3_pkgversion}-idna +%endif +Requires: python%{python3_pkgversion}-cryptography +Requires: python%{python3_pkgversion}-idna +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}} + + +%description -n python%{python3_pkgversion}-%{pkgname} %{_description} + + +%prep +%autosetup -n %{srcname}-%{version} +rm -rf %{eggname}.egg-info + + +%build +%py3_build + + +%install +%py3_install + + +%if %{with tests} +%check +PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} --verbose +%endif + + +%files -n python%{python3_pkgversion}-%{pkgname} +%license LICENSE LICENSE.MIT LICENSE.APACHE2 +%doc README.rst +%{python3_sitelib}/%{libname} +%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info + + +%changelog +* Thu Sep 13 2018 Carl George - 0.4.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..2fbb618 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (trustme-0.4.0.tar.gz) = bd12b0ebe076f65fd5d63e9b9c792672cd51ff630dd24200d2cdd488ea57fc0702d5f1f56ba5ab99836a4e6963e29c307c9c97ca84604fc894a7e95ed404ae8f