diff --git a/0001-fix-build-for-pytest.patch b/0001-fix-build-for-pytest.patch new file mode 100644 index 0000000000000000000000000000000000000000..4aeb35a447bb422c27c6d17266856bd4225fc9a9 --- /dev/null +++ b/0001-fix-build-for-pytest.patch @@ -0,0 +1,29 @@ +From 2ecfbe1d82ef2bcb6bba3d9d8a71dcc8e7811021 Mon Sep 17 00:00:00 2001 +From: baizg1107 +Date: Tue, 12 Jan 2021 11:18:35 +0800 +Subject: [PATCH] fix build for pytest + +--- + tests/conftest.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/tests/conftest.py b/tests/conftest.py +index c25e302..6a977ec 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -34,6 +34,11 @@ def pytest_addoption(parser): + + def pytest_runtest_setup(item): + skip_servertest = item.config.getoption(SKIP_SERVERTEST) +- if skip_servertest and item.get_marker("servertest") is not None: ++ #pytest 4+ ++ if hasattr(item, 'get_closest_marker'): ++ get_marker = item.get_closest_marker ++ else: ++ get_marker = item.get_marker ++ if skip_servertest and get_marker("servertest") is not None: + # args has --skip-servertests and test is marked as servertest + pytest.skip("Skip integration test") +-- +2.23.0 + diff --git a/custodia.spec b/custodia.spec index c7474bb85a77fa9adf04dae63273b91f734d26d4..8cae4cd96e71554b89bdfddbd88898970a24d3d5 100644 --- a/custodia.spec +++ b/custodia.spec @@ -1,6 +1,6 @@ Name: custodia Version: 0.6.0 -Release: 5 +Release: 6 Summary: A tool for managing secrets other processes License: GPLv3+ URL: https://github.com/latchset/%{name} @@ -11,6 +11,8 @@ Source4: custodia@.socket Source5: custodia.tmpfiles.conf BuildArch: noarch +Patch0: 0001-fix-build-for-pytest.patch + BuildRequires: systemd python3-devel python3-jwcrypto >= 0.4.2 BuildRequires: python3-requests python3-setuptools > 18 python3-coverage BuildRequires: python3-pytest python3-docutils python3-systemd @@ -47,7 +49,7 @@ Custodia is modular, the configuration file controls how authentication, authorization, storage and API plugins are combined and exposed. %prep -%autosetup -p1 +%autosetup -n %{name}-%{version} -p1 %build %py3_build @@ -128,5 +130,8 @@ exit 0 %{python3_sitelib}/%{name}-%{version}-py%{python3_version}-nspkg.pth %changelog +* Fri Jan 8 2021 baizhonggui 0.6.0-6 +- Fix building for pytest + * Fri May 15 2020 Captain Wei 0.6.0-5 - Package init