From a663d09fedcecdb3acd44ba023e5e555ef1ac3131446e241f82ae797b99d52fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 30 Jan 2024 14:31:59 +0000 Subject: [PATCH] Accepting request 1142130 from Application:ERP:GNUHealth:4.4 OBS-URL: https://build.opensuse.org/request/show/1142130 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cepa?expand=0&rev=8 --- python-cepa.changes | 9 +++++++++ python-cepa.spec | 28 +++++++++++++++++----------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/python-cepa.changes b/python-cepa.changes index 973b6aa..1c5f0c4 100644 --- a/python-cepa.changes +++ b/python-cepa.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sun Jan 28 16:46:07 UTC 2024 - Ben Greiner + +- Enable SLE15 python module for onionshare with Python 3.11 +- Use PEP517, don't catchall the sitelib +- Update requirements: + * setuptools is not used at runtime + * cryptography is not required, but recommended + ------------------------------------------------------------------- Wed Mar 8 04:31:43 UTC 2023 - Steve Kowalik diff --git a/python-cepa.spec b/python-cepa.spec index 928929e..2773170 100644 --- a/python-cepa.spec +++ b/python-cepa.spec @@ -1,7 +1,7 @@ # # spec file for package python-cepa # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,8 +16,10 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 +%{?sle15_python_module_pythons} +# tests do not work with python312. Hopefully we can go back to stem before python312 is mandatory +# https://github.com/onionshare/onionshare/issues/1851 +%define skip_python312 1 Name: python-cepa Version: 1.8.4 Release: 0 @@ -29,20 +31,21 @@ Source: https://files.pythonhosted.org/packages/source/c/cepa/cepa-%{ver # Replace use of the external mock module with the one in stdlib. Patch0: mock.patch Patch1: use-fullargspec.patch -BuildRequires: %{python_module cryptography} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: python-rpm-macros -#testing aarch64 +# SECTION test BuildRequires: %{python_module pyflakes} +BuildRequires: %{python_module cryptography} BuildRequires: %{python_module pycodestyle} -#/testing aarch64 -Requires: python-cryptography +# /SECTION Requires(post): update-alternatives Requires(postun):update-alternatives BuildArch: noarch - +Recommends: python-cryptography Provides: python-stem = %version-%release Obsoletes: python-stem < %version-%release @@ -56,16 +59,18 @@ With it you can use Tor's control protocol to script against the Tor process, or %prep %autosetup -p1 -n cepa-%{version} +sed -i '/"setuptools >= 65.4.1"/d' setup.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/tor-prompt %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +export PYTHONDONTWRITEBYTECODE=1 %{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} $python run_tests.py -u } @@ -80,6 +85,7 @@ $python run_tests.py -u %doc README.md %license LICENSE %python_alternative %{_bindir}/tor-prompt -%{python_sitelib}/* +%{python_sitelib}/stem +%{python_sitelib}/cepa-%{version}.dist-info %changelog