Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous RPM packaging improvements #297

Merged
merged 3 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
specfile_path: ansible-bender.spec
actions:
create-archive:
- "python3 -m build"
- "python3 -m build -s"
- "sh -c 'ls -1 dist/ansible-bender-$(python3 -m setuptools_scm).tar.gz'"
get-current-version:
- "python3 -m setuptools_scm"
Expand Down
17 changes: 8 additions & 9 deletions ansible-bender.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Summary: Build container images using Ansible playbooks

License: MIT
URL: https://github.com/ansible-community/ansible-bender
Source0: %{pypi_source}
Source0: %{pypi_source ansible-bender}

BuildArch: noarch

Expand All @@ -22,12 +22,6 @@ BuildRequires: pyproject-rpm-macros

%if %{with check}
# These are required for tests:
BuildRequires: python%{python3_pkgversion}-pyyaml
BuildRequires: python%{python3_pkgversion}-tabulate
BuildRequires: python%{python3_pkgversion}-jsonschema
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-flexmock
BuildRequires: python%{python3_pkgversion}-pytest-xdist
BuildRequires: ansible-core
BuildRequires: podman
BuildRequires: buildah
Expand All @@ -37,8 +31,6 @@ Requires: (ansible-core or ansible)
Suggests: ansible-core
Requires: buildah

%generate_buildrequires
%pyproject_buildrequires

%description
This is a tool which bends containers using Ansible playbooks and
Expand All @@ -52,6 +44,13 @@ tl;dr Ansible is the frontend, buildah is the backend.

%prep
%autosetup
# Coverage tests should not be run in the RPM build according to the Python
# Packaging Guidelines
sed -i '/pytest-cov/d' setup.cfg


%generate_buildrequires
%pyproject_buildrequires %{?with_check:-x testing}


%build
Expand Down