# 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:        25.1.2.dev3
Release:        1.20250203094107433022.pr459.3.g4c80d39%{?dist}
Summary:        Ansible-compat library

License:        GPL-3.0-or-later
URL:            https://github.com/ansible/ansible-compat
Source0:        ansible_compat-25.1.2.dev3.tar.gz

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 -n ansible_compat-25.1.2.dev3


%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
* Mon Feb 03 2025 Packit <hello@packit.dev> - 25.1.2.dev3-1.20250203094107433022.pr459.3.g4c80d39
- Minor test fixes (Sorin Sbarnea)
- Bump the dependencies group in /.config with 8 updates (#458) (dependabot[bot])
- Fix grammatical error in collection path info message (#456) (bluikko)

* Mon Feb 03 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Minor test fixes

* Mon Feb 03 2025 dependabot[bot] 49699333+dependabot[bot]@users.noreply.github.com 
- Bump the dependencies group in /.config with 8 updates (#458)

* Sat Feb 01 2025 bluikko 14869000+bluikko@users.noreply.github.com 
- Fix grammatical error in collection path info message (#456)

* Tue Jan 28 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Ensure that cache directory is writable (#453)

* Mon Jan 27 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Inject venv site-packages at the top of collection path (test isolation) (#447)

* Sun Jan 26 2025 dependabot[bot] 49699333+dependabot[bot]@users.noreply.github.com 
- Bump the dependencies group in /.config with 3 updates (#452)

* Thu Jan 23 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Patch #449 to use ANSIBLE_COLLECTIONS_PATH (#450)

* Wed Jan 22 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Fail if old ANSIBLE_COLLECTIONS_PATHS is detected (#449)

* Sun Jan 19 2025 dependabot[bot] 49699333+dependabot[bot]@users.noreply.github.com 
- Bump the dependencies group in /.config with 4 updates (#448)

* Fri Jan 17 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Ensure we constrain test dependencies with uv (#446)

* Sun Jan 12 2025 dependabot[bot] 49699333+dependabot[bot]@users.noreply.github.com 
- Bump the dependencies group in /.config with 2 updates (#445)

* Thu Jan 09 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Change cache_dir location to prefer venv and project_directory (#439)

* Wed Jan 08 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Use correct init_plugin_loader (#444)

* Tue Jan 07 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Enable support for ansible 2.18, drop 2.14/2.15 and py39 (#443)

* Tue Jan 07 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Enable toml-sort-fix (#442)

* Tue Jan 07 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Enable ruff preview rules (#441)

* Mon Jan 06 2025 pre-commit-ci[bot] 66853113+pre-commit-ci[bot]@users.noreply.github.com 
- chore: pre-commit autoupdate (#440)

* Mon Jan 06 2025 Sorin Sbarnea ssbarnea@redhat.com 
- Refactor search_galaxy_paths to use pathlib (#437)

* Sun Jan 05 2025 dependabot[bot] 49699333+dependabot[bot]@users.noreply.github.com 
- Bump the dependencies group in /.config with 2 updates (#438)

* Mon Dec 30 2024 dependabot[bot] 49699333+dependabot[bot]@users.noreply.github.com 
- Bump the dependencies group in /.config with 5 updates (#435)