From 1bd2027be5f386f65ae90759da5b680265bf5f3602a8ef614a5f7cacd3062248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 29 Jan 2019 12:32:44 +0000 Subject: [PATCH] - Really run tests - Disable docs building it is distributed by upstream and does not work on older openSUSE releases OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-josepy?expand=0&rev=9 --- python-josepy.changes | 7 ++++++ python-josepy.spec | 57 +++++++++---------------------------------- 2 files changed, 18 insertions(+), 46 deletions(-) diff --git a/python-josepy.changes b/python-josepy.changes index 8aaaffe..bd2368f 100644 --- a/python-josepy.changes +++ b/python-josepy.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 29 12:31:18 UTC 2019 - Tomáš Chvátal + +- Really run tests +- Disable docs building it is distributed by upstream and does not + work on older openSUSE releases + ------------------------------------------------------------------- Thu May 3 09:57:33 UTC 2018 - ecsos@opensuse.org diff --git a/python-josepy.spec b/python-josepy.spec index 6979eb7..596bf9c 100644 --- a/python-josepy.spec +++ b/python-josepy.spec @@ -1,7 +1,7 @@ # # spec file for package python-josepy # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -12,75 +12,50 @@ # 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/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} - %define libname josepy -%bcond_with test - Name: python-%{libname} Version: 1.1.0 Release: 0 Summary: JOSE protocol implementation in Python License: Apache-2.0 Group: Development/Languages/Python -Url: https://github.com/certbot/certbot +URL: https://github.com/certbot/josepy Source0: https://files.pythonhosted.org/packages/source/j/%{libname}/%{libname}-%{version}.tar.gz Source1: https://files.pythonhosted.org/packages/source/j/%{libname}/%{libname}-%{version}.tar.gz.asc Source2: %{name}.keyring +BuildRequires: %{python_module coverage >= 4.0} BuildRequires: %{python_module cryptography >= 0.8} BuildRequires: %{python_module devel >= 2.7} +BuildRequires: %{python_module mock} BuildRequires: %{python_module pyOpenSSL >= 0.13} +BuildRequires: %{python_module pytest >= 2.8.0} BuildRequires: %{python_module setuptools >= 1.0} BuildRequires: %{python_module six >= 1.9.0} BuildRequires: fdupes BuildRequires: python-rpm-macros -# for doc -BuildRequires: %{python_module Sphinx >= 1.0} -BuildRequires: %{python_module sphinx_rtd_theme} -%if %{with test} -BuildRequires: %{python_module coverage >= 4.0} -BuildRequires: %{python_module flake8} -BuildRequires: %{python_module mock} -BuildRequires: %{python_module pytest >= 2.8.0} -BuildRequires: %{python_module pytest-cache >= 1.0} -BuildRequires: %{python_module pytest-cov} -BuildRequires: %{python_module pytest-flake8 >= 0.5} -BuildRequires: %{python_module pytest-isort} -%endif Requires: python-cryptography >= 0.8 Requires: python-pyOpenSSL >= 0.13 -Requires: python-six >= 1.5.2 +Requires: python-six >= 1.9.0 Conflicts: python-acme < 0.21.0 +Obsoletes: python-%{libname}-doc BuildArch: noarch - %python_subpackages %description JOSE protocol implementation in Python using cryptography. It is used by the certbot project. Formerly Let's Encrypt project. -%package -n python-%{libname}-doc -Summary: Documentation for python-josepy libraries -#Provides: %%{python_module %%{libname}-doc = %%{version}} -Group: Documentation/HTML - -%description -n python-%{libname}-doc -Documentation for the JOSE protocol implementation libraries - %prep %setup -q -n %{libname}-%{version} +rm pytest.ini %build %python_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_install @@ -92,25 +67,15 @@ popd # remove duplicates %python_expand %fdupes %{buildroot}%{$python_sitelib}/%{libname} -%if %{with test} %check -# rise up errors. Find no fix. -%python_exec setup.py test -%endif +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} src/ %files %{python_files} -%defattr(-,root,root) -%doc LICENSE.txt +%license LICENSE.txt %{python_sitelib}/%{libname} %{python_sitelib}/%{libname}-%{version}*.egg-info %pycache_only %{python_sitelib}/%{libname}/__pycache__ # following the certbot-packaging guide, "jws" should not be packaged %exclude %{_bindir}/jws -%files -n python-%{libname}-doc -%defattr(-,root,root) -%doc LICENSE.txt -%doc README.rst -%doc docs/_build/html - %changelog