File python-acme.spec of Package python-acme
#
# spec file for package python-acme
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define libname acme
Name: python-%{libname}
Version: 0.15.0
Release: 0
Summary: Python library for the ACME protocol
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/certbot/certbot
Source0: https://files.pythonhosted.org/packages/source/a/%{libname}/%{libname}-%{version}.tar.gz
Source1: https://files.pythonhosted.org/packages/source/a/%{libname}/%{libname}-%{version}.tar.gz.asc
Source2: %{name}.keyring
BuildRequires: fdupes
BuildRequires: python-argparse
BuildRequires: python-cryptography >= 0.8
BuildRequires: python-devel
BuildRequires: python-dnspython >= 1.12
BuildRequires: python-mock
BuildRequires: python-ndg-httpsclient
BuildRequires: python-nose
BuildRequires: python-packaging
BuildRequires: python-pyOpenSSL >= 0.13
BuildRequires: python-pyRFC3339
BuildRequires: python-pytz
%if 0%{?suse_version} >= 1330
BuildRequires: python2-requests >= 2.10
%else
BuildRequires: python-requests >= 2.10
%endif
BuildRequires: python-setuptools >= 11.3
BuildRequires: python-six >= 1.5.2
BuildRequires: python-sphinx
BuildRequires: python-sphinx_rtd_theme
BuildRequires: python-sphinxcontrib-programoutput
BuildRequires: python-tox
BuildRequires: python-werkzeug
Requires: python-argparse
Requires: python-cryptography >= 0.8
Requires: python-dnspython >= 1.12
Requires: python-mock
Requires: python-ndg-httpsclient
Requires: python-pyOpenSSL >= 0.13
Requires: python-pyRFC3339
Requires: python-pyasn1
Requires: python-pytz
%if 0%{?suse_version} >= 1330
Requires: python2-requests >= 2.10
%else
Requires: python-requests >= 2.10
%endif
Requires: python-six >= 1.5.2
Requires: python-werkzeug
BuildArch: noarch
%description
Python library implementing the Automatic Certificate Management Environment
(ACME) protocol. It is used by the certbot project. Formerly Let's Encrypt project.
%package doc
Summary: Documentation for python-acme libraries
Group: Development/Languages/Python
%description doc
Documentation for the ACME python libraries
%prep
%setup -q -n %{libname}-%{version}
%build
python setup.py build
# create docs. Possible formats: man text html epub
pushd docs
make %{?_smp_mflags} html
rm -rf _build/html/{.buildinfo,man,_sources}
popd
%install
python setup.py install -O1 --skip-build --prefix=%{_prefix} --root=%{buildroot}
#remove test-data
rm -rf %{buildroot}%{python_sitelib}/%{libname}/testdata
rm -rf %{buildroot}%{python_sitelib}/%{libname}/*_test.py*
rm -rf %{buildroot}%{python_sitelib}/%{libname}/**/*_test.py*
# remove duplicates
%fdupes %{buildroot}%{python_sitelib}/%{libname}
%check
python setup.py test
%files
%defattr(-,root,root)
%doc LICENSE.txt
%{python_sitelib}/%{libname}
%{python_sitelib}/%{libname}-%{version}*.egg-info
# following the certbot-packaging guide, "jws" should not be packaged
%exclude %{_bindir}/jws
%files doc
%defattr(-,root,root)
%doc LICENSE.txt
%doc README.rst
%doc docs/_build/html
%changelog