From 58093071f2e3a9e37b208cacf675d4f535eb8d21 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Mar 27 2018 17:50:06 +0000 Subject: [PATCH 1/3] Only pull in asciidoc if with_docs --- diff --git a/ansible.spec b/ansible.spec index 904d077..fd25a7d 100644 --- a/ansible.spec +++ b/ansible.spec @@ -69,8 +69,10 @@ BuildRequires: python-setuptools # For building docs/tests BuildRequires: git-core +%if %with_docs BuildRequires: python-sphinx BuildRequires: asciidoc +%endif # For tests # We don't run tests on epel6, so don't bother pulling these in there. @@ -184,9 +186,11 @@ BuildRequires: python3-packaging # For Docs/tests BuildRequires: git-core +%if %with_docs BuildRequires: python3-sphinx BuildRequires: python3-sphinx-theme-alabaster BuildRequires: asciidoc +%endif # accelerate is the only thing that makes keyczar mandatory. Since accelerate # is deprecated, just ignore it #BuildRequires: python-keyczar From e2424d921c5e8818b0d5ac3b5d5b65ca43fa8b19 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Mar 27 2018 17:50:29 +0000 Subject: [PATCH 2/3] Make test runner use python3 with python3 tests --- diff --git a/ansible.spec b/ansible.spec index fd25a7d..781faa5 100644 --- a/ansible.spec +++ b/ansible.spec @@ -350,6 +350,10 @@ make PYTHON=/usr/bin/python2 tests %if 0%{?with_python3} pushd %{py3dir} ln -s /usr/bin/pytest-3 bin/pytest +# Fedora 26 does not have pathfix ¯\_(ツ)_/¯ +%if (0%{?fedora} > 26) + pathfix.py -i %{__python3} -p test/runner +%endif make PYTHON=/usr/bin/python3 tests-py3 popd %endif # python3 From a6000519c3f9c160e5fddd3824fe5afd76dcecc1 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Mar 27 2018 17:52:53 +0000 Subject: [PATCH 3/3] Use python3 test/runner within python3 docs --- diff --git a/ansible.spec b/ansible.spec index 781faa5..5d726cc 100644 --- a/ansible.spec +++ b/ansible.spec @@ -279,7 +279,7 @@ pushd %{py3dir} %if (0%{?fedora} == 26) make PYTHON=/usr/bin/python2 webdocs %else - pathfix.py -i %{__python3} -p docs/bin + pathfix.py -i %{__python3} -p docs/bin test/runner make PYTHON=/usr/bin/python3 webdocs %endif %endif