From 4371383c21fe65cfad47f0647e83b2f6fdd7ef20610544324fd4914d5ee669bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 12 Feb 2020 16:51:33 +0000 Subject: [PATCH] - Remove doc conditional as it is never built due to always being as a bcond_with - Use unittest directly to avoid setup.py test deprecation - Allow usage with construct 2.10 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pybeam?expand=0&rev=30 --- python-pybeam.changes | 8 ++++++++ python-pybeam.spec | 38 ++++++++++++-------------------------- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/python-pybeam.changes b/python-pybeam.changes index f9b6510..7b0fcb1 100644 --- a/python-pybeam.changes +++ b/python-pybeam.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Feb 12 16:47:55 UTC 2020 - Tomáš Chvátal + +- Remove doc conditional as it is never built due to always being + as a bcond_with +- Use unittest directly to avoid setup.py test deprecation +- Allow usage with construct 2.10 + ------------------------------------------------------------------- Sun Dec 15 02:38:15 UTC 2019 - Stefan Brüns diff --git a/python-pybeam.spec b/python-pybeam.spec index 54d2ba3..ea7394d 100644 --- a/python-pybeam.spec +++ b/python-pybeam.spec @@ -1,7 +1,7 @@ # -# spec file for package python-pybeam +# spec file for package python # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,12 +19,10 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" -%bcond_with doc -%bcond_without test %define psuffix -test +%bcond_without test %endif %if "%{flavor}" == "" -%bcond_with doc %bcond_with test %endif Name: python-pybeam%{?psuffix} @@ -33,25 +31,19 @@ Release: 0 Summary: Python module to parse Erlang BEAM files License: MIT Group: Development/Languages/Python -URL: http://github.com/matwey/pybeam +URL: https://github.com/matwey/pybeam Source: https://files.pythonhosted.org/packages/source/p/pybeam/pybeam-%{version}.tar.gz Patch0: make_sphinx_optional.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -%if %{with doc} -BuildRequires: %{python_module Sphinx} -BuildRequires: %{python_module construct < 2.10} -BuildRequires: %{python_module construct >= 2.9} -%endif -%if %{with test} -BuildRequires: %{python_module pybeam == %{version}} -BuildRequires: %{python_module six} -%endif -Requires: python-construct < 2.10 Requires: python-construct >= 2.9 Requires: python-six >= 1.4.0 BuildArch: noarch +%if %{with test} +BuildRequires: %{python_module construct >= 2.9} +BuildRequires: %{python_module six} +%endif %python_subpackages %description @@ -60,7 +52,7 @@ imports, exports, atoms, as well as compile info and attribute chunks in pretty python format. %package -n %{name}-doc -Summary: API Documentation for %name +Summary: API Documentation for %{name} Group: Documentation/HTML %description -n %{name}-doc @@ -71,14 +63,13 @@ chunks in pretty python format. %prep %setup -q -n pybeam-%{version} %patch0 -p1 +# do not block the new python-construct +sed -i -e ',<2.10' setup.py %build %if %{without test} %python_build %endif -%if %{with doc} -%python_build build_sphinx -%endif %install %if %{without test} @@ -88,7 +79,7 @@ chunks in pretty python format. %check %if %{with test} -%python_exec setup.py test +%python_exec -m unittest discover %endif %if %{without test} @@ -97,9 +88,4 @@ chunks in pretty python format. %{python_sitelib}/* %endif -%if %{with doc} -%files -n %{name}-doc -%doc build/html -%endif - %changelog