Skip to content

Commit

Permalink
Update test dependencies
Browse files Browse the repository at this point in the history
1. This commit introduces the [test] subpackage

2. It removes requests-mock <= 1.11 requirement

At the time of writing this commit requests-mock is packaged with the
following versions in Fedora and Epel.

Fedora 42	python-requests-mock-1.10.0-9.fc41
Fedora 41	python-requests-mock-1.10.0-9.fc41
Fedora 40	python-requests-mock-1.10.0-7.fc40
Fedora 39	python-requests-mock-1.10.0-5.fc39
Fedora EPEL 9	python-requests-mock-1.10.0-2.el9
Fedora EPEL 8	python-requests-mock-1.7.0-1.el8

3. It excludes the test subpackage and the check dependencies for test
   dependencies when run for distros which are not Fedora i.e. CentOS
Stream

Signed-off-by: Nicola Sella <[email protected]>
  • Loading branch information
inknos committed Sep 26, 2024
1 parent 01aab97 commit 94e43e8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ progress_bar = [
docs = [
"sphinx"
]
test = [
"coverage",
"fixtures",
"pytest",
"requests-mock",
]

[project.urls]
"Bug Tracker" = "https://github.com/containers/podman-py/issues"
Expand Down
16 changes: 14 additions & 2 deletions rpm/python-podman.spec
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ Summary: %{summary}

%if !%{defined rhel8_py}
%generate_buildrequires
%pyproject_buildrequires %{?with_tests:-t}
# In fedora all testing dependencies are packaged
# In CentOS stream they are not. Tests are run upstream
%if 0%{?fedora}
%pyproject_buildrequires -x test
%else
%pyproject_buildrequires
%endif
%endif

%build
Expand All @@ -83,7 +89,13 @@ export PBR_VERSION="0.0.0"

%if !%{defined rhel8_py}
%check
%pyproject_check_import -e podman.api.typing_extensions
# In fedora all testing dependencies are packaged
# In CentOS stream they are not. Tests are run upstream
%if 0%{?fedora}
%pyproject_check_import
%else
%pyproject_check_import -e podman.tests.*
%endif
%endif

%if %{defined rhel8_py}
Expand Down

0 comments on commit 94e43e8

Please sign in to comment.