[packages/python-easy-server: 1/2] - new
qboosh
qboosh at pld-linux.org
Sun Feb 15 11:24:09 CET 2026
commit 9336308aa228cd5bcebcd71530c176e931489b7b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Feb 15 11:23:47 2026 +0100
- new
easy-server-requirements.patch | 13 ++++
easy-server-warn.patch | 42 ++++++++++
python-easy-server.spec | 173 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 228 insertions(+)
---
diff --git a/python-easy-server.spec b/python-easy-server.spec
new file mode 100644
index 0000000..dd7099f
--- /dev/null
+++ b/python-easy-server.spec
@@ -0,0 +1,173 @@
+#
+# 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 server access that is easy to use
+Summary(pl.UTF-8): Bezpieczny, łatwy w użyciu dostęp do serwera
+Name: python-easy-server
+Version: 0.8.0
+Release: 1
+License: Apache v2.0
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/easy-server/
+Source0: https://files.pythonhosted.org/packages/source/e/easy-server/easy-server-%{version}.tar.gz
+# Source0-md5: e02bfe02a240bf8f7c70d7f22b949883
+Patch0: easy-server-warn.patch
+Patch1: easy-server-requirements.patch
+URL: https://pypi.org/project/easy-server/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-PyYAML >= 5.3.1
+BuildRequires: python-easy-vault >= 0.7.0
+BuildRequires: python-jsonschema >= 2.6.0
+BuildRequires: python-mock >= 2.0.0
+BuildRequires: python-pyrsistent >= 0.14.0
+BuildRequires: python-pytest >= 4.3.1
+BuildRequires: python-six >= 1.14.0
+BuildRequires: python-testfixtures
+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-easy-vault >= 0.7.0
+BuildRequires: python3-jsonschema >= 2.6.0
+BuildRequires: python3-pyrsistent >= 0.14.0
+BuildRequires: python3-pytest >= 4.3.1
+BuildRequires: python3-six >= 1.14.0
+BuildRequires: python3-testfixtures
+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: python3-sphinxcontrib-fulltoc >= 1.2.0
+BuildRequires: python3-sphinxcontrib-websupport >= 1.1.2
+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-server Python package provides commands for encrypting and
+decrypting server files that can be in any format. It provides for
+programmatic access to encrypted server 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-server 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-server
+Summary: Secure server 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-server
+The easy-server Python package provides commands for encrypting and
+decrypting server files that can be in any format. It provides for
+programmatic access to encrypted server 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-server -l pl.UTF-8
+Pakiet Pythona easy-server 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-server module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona easy-server
+Group: Documentation
+
+%description apidocs
+API documentation for Python easy-server module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona easy-server.
+
+%prep
+%setup -q -n easy-server-%{version}
+%patch -P0 -p1
+%patch -P1 -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
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%{py_sitescriptdir}/easy_server
+%{py_sitescriptdir}/easy_server-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-easy-server
+%defattr(644,root,root,755)
+%doc README.rst
+%{py3_sitescriptdir}/easy_server
+%{py3_sitescriptdir}/easy_server-%{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-server-requirements.patch b/easy-server-requirements.patch
new file mode 100644
index 0000000..65e4426
--- /dev/null
+++ b/easy-server-requirements.patch
@@ -0,0 +1,13 @@
+--- easy-server-0.8.0/requirements.txt.orig 2021-04-05 19:38:08.000000000 +0200
++++ easy-server-0.8.0/requirements.txt 2026-02-15 11:20:16.769177274 +0100
+@@ -35,8 +35,8 @@ jsonschema>=2.6.0
+ # pyrsistent is pulled in by jsonschema.
+ # Before its version 0.17.0, pyrsistent did not or not correctly declare its
+ # required Python versions in the package metadata.
+-# pyrsistent 0.16.0 removed support for Python 2.7.
++# pyrsistent 0.17.0 removed support for Python 2.7.
+ # pyrsistent 0.15.0 removed support for Python 3.4.
+-pyrsistent>=0.14.0,<0.16.0; python_version == '2.7'
++pyrsistent>=0.14.0,<0.17.0; python_version == '2.7'
+ pyrsistent>=0.14.0,<0.15.0; python_version == '3.4'
+ pyrsistent>=0.14.0; python_version >= '3.5'
diff --git a/easy-server-warn.patch b/easy-server-warn.patch
new file mode 100644
index 0000000..ea01fb8
--- /dev/null
+++ b/easy-server-warn.patch
@@ -0,0 +1,42 @@
+pytest.warns(None) is no longer supported in pytest >= 8.
+Use a method proposed in pytest docs.
+--- easy-server-0.8.0/tests/utils/simplified_test_function.py.orig 2021-03-27 21:47:19.000000000 +0100
++++ easy-server-0.8.0/tests/utils/simplified_test_function.py 2026-02-15 11:15:28.610738363 +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 +218,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-server.git/commitdiff/ddce3e5041a31eb47143335a9b09a27eb881b387
More information about the pld-cvs-commit
mailing list