summaryrefslogtreecommitdiffstats
path: root/.config/python3-ansible-compat.spec
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.config/python3-ansible-compat.spec66
1 files changed, 66 insertions, 0 deletions
diff --git a/.config/python3-ansible-compat.spec b/.config/python3-ansible-compat.spec
new file mode 100644
index 0000000..362b563
--- /dev/null
+++ b/.config/python3-ansible-compat.spec
@@ -0,0 +1,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