14
0

Accepting request 1231283 from devel:languages:python

- Skip a few tests that attempt name resolution.
- Switch to pytest macro.
- No more greedy globs in %files.

OBS-URL: https://build.opensuse.org/request/show/1231283
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pycapnp?expand=0&rev=7
This commit is contained in:
2024-12-16 18:17:01 +00:00
committed by Git OBS Bridge
2 changed files with 13 additions and 9 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
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> Tue Apr 16 08:24:15 UTC 2024 - Markéta Machová <mmachova@suse.com>

View File

@@ -37,6 +37,8 @@ BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(capnp) BuildRequires: pkgconfig(capnp)
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages %python_subpackages
%description %description
@@ -56,18 +58,12 @@ export CFLAGS="%{optflags}"
%{python_expand rm %{buildroot}%{$python_sitearch}/capnp/helpers/*.h %{python_expand rm %{buildroot}%{$python_sitearch}/capnp/helpers/*.h
%fdupes %{buildroot}%{$python_sitearch} %fdupes %{buildroot}%{$python_sitearch}
} }
%python_expand find %{buildroot}%{$python_sitearch}
%check %check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
mv capnp/ /tmp mv capnp/ /tmp
if [[ "$python" == "python3" || "$python" == "python3.6" ]]; then # Attempts to resolve names
$python -m pytest -k 'not async' %pytest_arch -k 'not (test_ssl_async_example or test_ssl_reconnecting_async_example or test_async_ssl_calculator_example)'
else
$python -m pytest
fi
mv /tmp/capnp/ . mv /tmp/capnp/ .
}
%post %post
%python_install_alternative capnpc-cython %python_install_alternative capnpc-cython
@@ -79,6 +75,7 @@ mv /tmp/capnp/ .
%doc CHANGELOG.md README.md %doc CHANGELOG.md README.md
%license LICENSE.md %license LICENSE.md
%python_alternative %{_bindir}/capnpc-cython %python_alternative %{_bindir}/capnpc-cython
%{python_sitearch}/* %{python_sitearch}/capnp
%{python_sitearch}/pycapnp-%{version}.dist-info
%changelog %changelog