diff --git a/7.patch b/7.patch new file mode 100644 index 0000000..831a5ac --- /dev/null +++ b/7.patch @@ -0,0 +1,46 @@ +From 46b2192c1c146bffda04ffe696a8934015af5777 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Mon, 13 May 2019 10:48:03 +0200 +Subject: [PATCH] Build docs with Python 3 + +Fixes https://github.com/WoLpH/python-utils/issues/6 +--- + docs/conf.py | 4 +++- + tox.ini | 2 +- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/docs/conf.py b/docs/conf.py +index 6f1ccba..f2225c5 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -67,7 +67,7 @@ + + # Monkey patch to disable nonlocal image warning + import sphinx +-if hasattr(sphinx, 'environment'): ++try: + original_warn_mode = sphinx.environment.BuildEnvironment.warn_node + + def allow_nonlocal_image_warn_node(self, msg, *args, **kwargs): +@@ -76,6 +76,8 @@ def allow_nonlocal_image_warn_node(self, msg, *args, **kwargs): + + sphinx.environment.BuildEnvironment.warn_node = \ + allow_nonlocal_image_warn_node ++except AttributeError: ++ pass + + suppress_warnings = [ + 'image.nonlocal_uri', +diff --git a/tox.ini b/tox.ini +index 33b165c..b588f0a 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -19,7 +19,7 @@ deps = flake8 + commands = flake8 --ignore=W391 python_utils {posargs} + + [testenv:docs] +-basepython = python2.7 ++basepython = python3 + whitelist_externals = + rm + cd diff --git a/python-utils.spec b/python-utils.spec index 834233f..86b1e85 100644 --- a/python-utils.spec +++ b/python-utils.spec @@ -1,11 +1,15 @@ Name: python-utils Version: 2.3.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Python Utils is a module with some convenient utilities License: BSD URL: https://github.com/WoLpH/python-utils Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# Build docs with python3 +# https://bugzilla.redhat.com/show_bug.cgi?id=1709063 +# https://github.com/WoLpH/python-utils/pull/7 +Patch0: https://patch-diff.githubusercontent.com/raw/WoLpH/python-utils/pull/7.patch BuildArch: noarch BuildRequires: python3-devel @@ -14,7 +18,6 @@ BuildRequires: python3-pytest BuildRequires: python3-setuptools BuildRequires: python3-six BuildRequires: python3-flake8 -BuildRequires: python3-pytest-cache BuildRequires: python3-pytest-cov BuildRequires: python3-pytest-flakes BuildRequires: python3-pytest-pep8 @@ -40,7 +43,7 @@ and making sure a string is in unicode or bytes format. %prep -%autosetup -n %{name}-%{version} +%autosetup -p1 -n %{name}-%{version} # Remove bundled egg-info rm -rf %{name}.egg-info @@ -70,6 +73,10 @@ rm -rf html/{.doctrees,.buildinfo,*.inv} %{python3_sitelib}/python_utils-%{version}-py?.?.egg-info %changelog +* Mon May 13 2019 Orion Poplawski - 2.3.0-5 +- Add patch to build docs with python 3 (bugz#1709063) +- Drop unneeded BR on pytest-cache + * Sat Feb 02 2019 Fedora Release Engineering - 2.3.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild