account for the removed Makefile
This commit is contained in:
parent
3394859eb9
commit
c98092b221
@ -11,7 +11,8 @@ Release: 2%{?dist}
|
|||||||
# are BSD licensed. There are various files scattered throughout the codebase
|
# are BSD licensed. There are various files scattered throughout the codebase
|
||||||
# containing code under different licenses.
|
# containing code under different licenses.
|
||||||
License: GPL-3.0-or-later AND BSD-2-Clause AND PSF-2.0 AND MIT AND Apache-2.0
|
License: GPL-3.0-or-later AND BSD-2-Clause AND PSF-2.0 AND MIT AND Apache-2.0
|
||||||
Source: https://github.com/ansible/ansible/archive/v%{uversion}/%{name}-%{uversion}.tar.gz
|
Source0: https://github.com/ansible/ansible/archive/v%{uversion}/%{name}-%{uversion}.tar.gz
|
||||||
|
Source1: build_manpages.py
|
||||||
Url: https://ansible.com
|
Url: https://ansible.com
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -48,7 +49,6 @@ Obsoletes: ansible-base < 2.10.6-1
|
|||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
# Needed to build manpages from source.
|
# Needed to build manpages from source.
|
||||||
BuildRequires: python%{python3_pkgversion}-straight-plugin
|
|
||||||
BuildRequires: python%{python3_pkgversion}-docutils
|
BuildRequires: python%{python3_pkgversion}-docutils
|
||||||
# Shell completions
|
# Shell completions
|
||||||
BuildRequires: python%{python3_pkgversion}-argcomplete
|
BuildRequires: python%{python3_pkgversion}-argcomplete
|
||||||
@ -95,7 +95,6 @@ This package installs extensive documentation for ansible-core
|
|||||||
%autosetup -p1 -n ansible-%{uversion}
|
%autosetup -p1 -n ansible-%{uversion}
|
||||||
find \( -name '.git_keep' -o -name '.rstcheck.cfg' \) -delete
|
find \( -name '.git_keep' -o -name '.rstcheck.cfg' \) -delete
|
||||||
|
|
||||||
# ansible-test is executed directly by the Makefile, so we need to fix the shebang.
|
|
||||||
sed -i -s 's|/usr/bin/env python|%{python3}|' \
|
sed -i -s 's|/usr/bin/env python|%{python3}|' \
|
||||||
bin/ansible-test \
|
bin/ansible-test \
|
||||||
test/lib/ansible_test/_util/target/cli/ansible_test_cli_stub.py
|
test/lib/ansible_test/_util/target/cli/ansible_test_cli_stub.py
|
||||||
@ -116,7 +115,13 @@ sed '/^mock$/d' test/lib/ansible_test/_data/requirements/units.txt > _requiremen
|
|||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
|
||||||
# Build manpages
|
# Build manpages
|
||||||
make PYTHON=%{python3} docs
|
|
||||||
|
# XXX: This should be removed once upstream provides a proper way to build
|
||||||
|
# manpages from source.
|
||||||
|
# See https://github.com/ansible/ansible/issues/80368
|
||||||
|
# and the discussion in https://github.com/ansible/ansible/pull/80372
|
||||||
|
# for more details.
|
||||||
|
PYTHONPATH="$(pwd)/packaging" %{python3} %{S:1}
|
||||||
|
|
||||||
# Build shell completions
|
# Build shell completions
|
||||||
(
|
(
|
||||||
@ -215,8 +220,8 @@ install -Dpm 0644 licenses/* -t %{buildroot}%{_pkglicensedir}
|
|||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
ln -s /usr/bin/pytest-3 bin/pytest
|
%{python3} bin/ansible-test \
|
||||||
make PYTHON=%{python3} tests-py3
|
units --local --python-interpreter %{python3}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
@ -242,6 +247,7 @@ make PYTHON=%{python3} tests-py3
|
|||||||
%changelog
|
%changelog
|
||||||
* Mon Apr 24 2023 Maxwell G <maxwell@gtmx.me> - 2.15.0~b3-1
|
* Mon Apr 24 2023 Maxwell G <maxwell@gtmx.me> - 2.15.0~b3-1
|
||||||
- Update to 2.15.0~b3.
|
- Update to 2.15.0~b3.
|
||||||
|
- Account for the removed Makefile
|
||||||
|
|
||||||
* Mon Apr 24 2023 Maxwell G <maxwell@gtmx.me> - 2.14.4-2
|
* Mon Apr 24 2023 Maxwell G <maxwell@gtmx.me> - 2.14.4-2
|
||||||
- Add gating
|
- Add gating
|
||||||
|
27
build_manpages.py
Normal file
27
build_manpages.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Copyright (C) Ansible Project
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from pep517_backend._backend import (
|
||||||
|
_convert_rst_in_template_to_manpage,
|
||||||
|
_generate_rst_in_templates,
|
||||||
|
_get_package_distribution_version,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
Path('docs/man/man1/').mkdir(exist_ok=True, parents=True)
|
||||||
|
version_number = _get_package_distribution_version()
|
||||||
|
for rst_in in _generate_rst_in_templates():
|
||||||
|
_convert_rst_in_template_to_manpage(
|
||||||
|
rst_doc_template=rst_in.read_text(),
|
||||||
|
destination_path=rst_in.with_suffix('').with_suffix(''),
|
||||||
|
version_number=version_number,
|
||||||
|
)
|
||||||
|
rst_in.unlink()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
Reference in New Issue
Block a user