Compare commits

4 Commits

2 changed files with 23 additions and 15 deletions

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Tue Jun 17 09:25:58 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Mon Dec 16 01:24:52 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Skip a few tests that attempt name resolution.
- Switch to pytest macro.
- No more greedy globs in %files.
-------------------------------------------------------------------
Tue Apr 16 08:24:15 UTC 2024 - Markéta Machová <mmachova@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pycapnp
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,7 @@
#
%bcond_without libalternatives
%{?sle15_python_module_pythons}
Name: python-pycapnp
Version: 2.0.0
@@ -33,10 +34,13 @@ BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(capnp)
Requires: alts
%python_subpackages
%description
@@ -56,29 +60,21 @@ export CFLAGS="%{optflags}"
%{python_expand rm %{buildroot}%{$python_sitearch}/capnp/helpers/*.h
%fdupes %{buildroot}%{$python_sitearch}
}
%python_expand find %{buildroot}%{$python_sitearch}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
mv capnp/ /tmp
if [[ "$python" == "python3" || "$python" == "python3.6" ]]; then
$python -m pytest -k 'not async'
else
$python -m pytest
fi
# Attempts to resolve names
%pytest_arch -k 'not (test_ssl_async_example or test_ssl_reconnecting_async_example or test_async_ssl_calculator_example)'
mv /tmp/capnp/ .
}
%post
%python_install_alternative capnpc-cython
%postun
%python_uninstall_alternative capnpc-cython
%pre
%python_libalternatives_reset_alternative capnpc-cython
%files %{python_files}
%doc CHANGELOG.md README.md
%license LICENSE.md
%python_alternative %{_bindir}/capnpc-cython
%{python_sitearch}/*
%{python_sitearch}/capnp
%{python_sitearch}/pycapnp-%{version}.dist-info
%changelog