[packages/python-easy-vault: 1/2] - new
qboosh
qboosh at pld-linux.org
Sat Feb 14 12:11:52 CET 2026
commit 71659277dabcacc55b57ba9b965d00205ef99475
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Feb 14 12:11:20 2026 +0100
- new
easy-vault-warn.patch | 42 ++++++++++++
python-easy-vault.spec | 177 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 219 insertions(+)
---
diff --git a/python-easy-vault.spec b/python-easy-vault.spec
new file mode 100644
index 0000000..2fe4d0a
--- /dev/null
+++ b/python-easy-vault.spec
@@ -0,0 +1,177 @@
+#
+# Conditional build:
+%bcond_with doc # Sphinx documentation (not in sdist)
+%bcond_without tests # unit tests
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+Summary: Secure vault files that are easy to use
+Summary(pl.UTF-8): Łatwe w użyciu pliki sejfu
+Name: python-easy-vault
+Version: 0.7.0
+Release: 1
+License: Apache v2.0
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/easy-vault/
+Source0: https://files.pythonhosted.org/packages/source/e/easy-vault/easy-vault-%{version}.tar.gz
+# Source0-md5: 83e125213a59a9d2b918db521c4fb3b0
+Patch0: easy-vault-warn.patch
+URL: https://pypi.org/project/easy-vault/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-PyYAML >= 5.3.1
+BuildRequires: python-cffi >= 1.14.5
+BuildRequires: python-click >= 7.1.1
+BuildRequires: python-cryptography >= 3.3
+BuildRequires: python-keyring >= 18.0.0
+BuildRequires: python-mock >= 2.0.0
+BuildRequires: python-pytest >= 4.3.1
+BuildRequires: python-six >= 1.14.0
+BuildRequires: python-yamlloader >= 0.5.5
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.4
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-PyYAML >= 5.2
+BuildRequires: python3-cffi >= 1.14.5
+BuildRequires: python3-click >= 7.0
+BuildRequires: python3-cryptography >= 3.3
+BuildRequires: python3-keyring >= 18.0.0
+BuildRequires: python3-pytest >= 4.3.1
+BuildRequires: python3-six >= 1.14.0
+BuildRequires: python3-yamlloader >= 0.5.5
+%endif
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: python3-autodocsumm >= 0.1.13
+BuildRequires: python3-sphinx_git >= 10.1.1
+BuildRequires: python3-sphinx_rtd_theme >= 0.5.0
+BuildRequires: sphinx-pdg-3 >= 1.7.6
+%endif
+Requires: python-modules >= 1:2.7
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The easy-vault Python package provides commands for encrypting and
+decrypting vault files that can be in any format. It provides for
+programmatic access to encrypted vault files from Python programs, so
+that the file itself can stay encrypted in the file system but can
+still be used by the program in clear text.
+
+%description -l pl.UTF-8
+Pakiet Pythona easy-vault udostępnia polecenia do szyfrowania oraz
+odszyfrowywania plików sejfu, które mogą być w dowolnym formacie.
+Pozwala na programowy dostęp do zaszyfrowanych plików sejfu z kodu w
+Pythonie, dzięki czemu sam plik w systemie plików może pozostać
+zaszyfrowany, ale może być używany przez program jako czysty tekst.
+
+%package -n python3-easy-vault
+Summary: Secure vault files that are easy to use
+Summary(pl.UTF-8): Łatwe w użyciu pliki sejfu
+Group: Libraries/Python
+Requires: python3-modules >= 1:3.4
+
+%description -n python3-easy-vault
+The easy-vault Python package provides commands for encrypting and
+decrypting vault files that can be in any format. It provides for
+programmatic access to encrypted vault files from Python programs, so
+that the file itself can stay encrypted in the file system but can
+still be used by the program in clear text.
+
+%description -n python3-easy-vault -l pl.UTF-8
+Pakiet Pythona easy-vault udostępnia polecenia do szyfrowania oraz
+odszyfrowywania plików sejfu, które mogą być w dowolnym formacie.
+Pozwala na programowy dostęp do zaszyfrowanych plików sejfu z kodu w
+Pythonie, dzięki czemu sam plik w systemie plików może pozostać
+zaszyfrowany, ale może być używany przez program jako czysty tekst.
+
+%package apidocs
+Summary: API documentation for Python easy-vault module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona easy-vault
+Group: Documentation
+
+%description apidocs
+API documentation for Python easy-vault module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona easy-vault.
+
+%prep
+%setup -q -n easy-vault-%{version}
+%patch -P0 -p1
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python} -m pytest tests
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
+%endif
+%endif
+
+%if %{with doc}
+sphinx-build-3 -b html docs docs/_build/html
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/easy-vault{,-2}
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/easy-vault{,-3}
+ln -sf easy-vault-3 $RPM_BUILD_ROOT%{_bindir}/easy-vault
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%attr(755,root,root) %{_bindir}/easy-vault-2
+%{py_sitescriptdir}/easy_vault
+%{py_sitescriptdir}/easy_vault-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-easy-vault
+%defattr(644,root,root,755)
+%doc README.rst
+%attr(755,root,root) %{_bindir}/easy-vault-3
+%{_bindir}/easy-vault
+%{py3_sitescriptdir}/easy_vault
+%{py3_sitescriptdir}/easy_vault-%{version}-py*.egg-info
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
+%endif
diff --git a/easy-vault-warn.patch b/easy-vault-warn.patch
new file mode 100644
index 0000000..4a98ed7
--- /dev/null
+++ b/easy-vault-warn.patch
@@ -0,0 +1,42 @@
+pytest.warns(None) is no longer supported in pytest >= 8.
+Use a method proposed in pytest docs.
+--- easy-vault-0.7.0/tests/utils/simplified_test_function.py.orig 2021-03-28 13:45:14.000000000 +0200
++++ easy-vault-0.7.0/tests/utils/simplified_test_function.py 2026-02-14 11:08:54.047611531 +0100
+@@ -18,6 +18,7 @@ from __future__ import absolute_import
+
+ import re
+ import functools
++import warnings
+ from collections import namedtuple
+ try:
+ from inspect import Signature, Parameter
+@@ -189,7 +190,8 @@ def simplified_test_function(test_func):
+
+ assert len(rec_warnings) >= 1
+ else:
+- with pytest.warns(None) as rec_warnings:
++ with warnings.catch_warnings():
++ warnings.simplefilter("error")
+ if exp_exc_types:
+ with pytest.raises(exp_exc_types) as exc_info:
+ if condition == 'pdb':
+@@ -216,19 +217,6 @@ def simplified_test_function(test_func):
+ test_func(testcase, **kwargs) # not expecting an exception
+
+ ret = None # Test function has returned (debugging hint)
+-
+- # Verify that no warnings have occurred
+- if exp_warn_types is None and rec_warnings:
+- lines = []
+- for w in rec_warnings.list:
+- tup = (w.filename, w.lineno, w.category.__name__,
+- str(w.message))
+- line = "{t[0]}:{t[1]}: {t[2]}: {t[3]}".format(t=tup)
+- if line not in lines:
+- lines.append(line)
+- msg = "Unexpected warnings:\n{}".format(
+- '\n'.join(lines))
+- raise AssertionError(msg)
+ return ret
+
+ # Needed because the decorator is signature-changin
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-easy-vault.git/commitdiff/4cebe59e8dc41be27d659e51f0fc191aa66e9e9b
More information about the pld-cvs-commit
mailing list