1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
# spell-checker:ignore bcond pkgversion buildrequires autosetup PYTHONPATH noarch buildroot bindir sitelib numprocesses clib
# All tests require Internet access
# to test in mock use: --enable-network --with check
# to test in a privileged environment use:
# --with check --with privileged_tests
%bcond_with check
%bcond_with privileged_tests
Name: ansible-compat
Version: VERSION_PLACEHOLDER
Release: 1%{?dist}
Summary: Ansible-compat library
License: GPL-3.0-or-later
URL: https://github.com/ansible/ansible-compat
Source0: %{pypi_source}
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
%if %{with check}
# These are required for tests:
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-pytest-xdist
BuildRequires: python%{python3_pkgversion}-libselinux
BuildRequires: git-core
%endif
Requires: git-core
%description
Ansible-compat.
%prep
%autosetup
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files ansible_compat
%check
%pyproject_check_import
%if %{with check}
%pytest \
-v \
--disable-pytest-warnings \
--numprocesses=auto \
test
%endif
%files -f %{pyproject_files}
%license LICENSE
%doc docs/ README.md
%changelog
|