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

%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
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
BuildRequires:  python-requests >= 2.10
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
Requires:       python-requests >= 2.10
Requires:       python-six >= 1.5.2
Requires:       python-werkzeug
BuildArch:      noarch

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

%setup -q -n %{libname}-%{version}

python build

# create docs. Possible formats: man text html epub
pushd docs
make %{?_smp_mflags} html
rm -rf _build/html/{.buildinfo,man,_sources}

python install -O1 --skip-build --prefix=%{_prefix} --root=%{buildroot}
#remove test-data
rm -rf %{buildroot}%{python_sitelib}/%{libname}/testdata
rm -rf %{buildroot}%{python_sitelib}/%{libname}/**
rm -rf %{buildroot}%{python_sitelib}/%{libname}/**/**

# remove duplicates
%fdupes %{buildroot}%{python_sitelib}/%{libname}

python test

%doc LICENSE.txt
# following the certbot-packaging guide, "jws" should not be packaged
%exclude %{_bindir}/jws

%files doc
%doc LICENSE.txt
%doc README.rst
%doc docs/_build/html

openSUSE Build Service is sponsored by