diff --git a/ansible-core.spec b/ansible-core.spec index 640da87..834f407 100644 --- a/ansible-core.spec +++ b/ansible-core.spec @@ -74,56 +74,18 @@ Conflicts: ansible <= 2.9.99 Provides: ansible-base = %{version}-%{release} Obsoletes: ansible-base < 2.10.6-1 -%if %{with tests} -# -# For tests -# -# These two exist on both fedora and rhel8 -# -BuildRequires: make -BuildRequires: git-core -BuildRequires: python3-packaging -BuildRequires: python3-pexpect -BuildRequires: python3-pytz -BuildRequires: glibc-all-langpacks -BuildRequires: python3-resolvelib -# -# These only exist on Fedora. RHEL8 will just skip tests that need them. -# -%if 0%{?fedora} -BuildRequires: python3-paramiko -BuildRequires: python3-winrm - -BuildRequires: python3-coverage -BuildRequires: python3-passlib -%endif -%endif -%if %{with docs} -BuildRequires: make -BuildRequires: python3-sphinx -BuildRequires: python3-sphinx-theme-alabaster -BuildRequires: python3-sphinx-notfound-page -BuildRequires: asciidoc -BuildRequires: python3-straight-plugin -BuildRequires: python3-rstcheck -BuildRequires: python3-pygments -BuildRequires: antsibull -%endif - -# -# main buildrequires to build -# BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pytest -BuildRequires: python3-pytest-xdist -BuildRequires: python3-pytest-mock -BuildRequires: python3-jinja2 -BuildRequires: python3-pyyaml -BuildRequires: python3-cryptography +BuildRequires: make # Needed to build manpages from source. BuildRequires: python3-straight-plugin BuildRequires: python3-docutils + +%if %{with tests} +BuildRequires: git-core +BuildRequires: glibc-all-langpacks +BuildRequires: python3-systemd +%endif + # Require packaging macros if rpm-build exists # This makes the transition seamless for other packages Requires: (ansible-packaging if rpm-build) @@ -175,7 +137,7 @@ sed -i -s 's|/usr/bin/env python|%{__python3}|' test/lib/ansible_test/_util/targ # Build manpages make PYTHON=%{__python3} docs -%py3_build +%pyproject_wheel %if %{with docs} make PYTHON=%{__python3} SPHINXBUILD=sphinx-build-3 webdocs @@ -185,7 +147,7 @@ make PYTHON=%{__python3} docs %endif %install -%py3_install +%pyproject_install # Create system directories that Ansible defines as default locations in # ansible/config/base.yml @@ -250,7 +212,7 @@ make PYTHON=%{__python3} tests-py3 %{_datadir}/ansible/ %{python3_sitelib}/ansible %{python3_sitelib}/ansible_test -%{python3_sitelib}/*egg-info +%{python3_sitelib}/*dist-info %files -n ansible-core-doc %doc docs/docsite/rst