Skip to content

Commit

Permalink
Update python-atspi to version 2.38.0 / rev 64 via SR 857822
Browse files Browse the repository at this point in the history
https://build.opensuse.org/request/show/857822
by user dimstar + dimstar_suse
- Support future multiple python3 flavors
  * fix py*atspi provides
  * remove %ifpython3 -- it will break
  * gh#openSUSE/python-rpm-macros#66
- Enable testsuite. General rule for python packages: must run if
  they are available. And it revealed a problem with the
  (not given) path to the python interpreter.
  * The test suite compiles test libraries which do not work for
    armv7l and ppc64le. Skip there. (forwarded request 855753 from bnavigator)
  • Loading branch information
dimstar authored and bmwiedemann committed Dec 23, 2020
1 parent df8f73f commit ce97a82
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 15 deletions.
Binary file modified packages/p/python-atspi/.files
Binary file not shown.
16 changes: 16 additions & 0 deletions packages/p/python-atspi/.rev
Original file line number Diff line number Diff line change
Expand Up @@ -503,4 +503,20 @@
<comment>Push GNOME 3.38</comment>
<requestid>847258</requestid>
</revision>
<revision rev="64" vrev="2">
<srcmd5>90a8f93f33b33f290f828f6df1f21dba</srcmd5>
<version>2.38.0</version>
<time>1608729631</time>
<user>dimstar_suse</user>
<comment>- Support future multiple python3 flavors
* fix py*atspi provides
* remove %ifpython3 -- it will break
* gh#openSUSE/python-rpm-macros#66
- Enable testsuite. General rule for python packages: must run if
they are available. And it revealed a problem with the
(not given) path to the python interpreter.
* The test suite compiles test libraries which do not work for
armv7l and ppc64le. Skip there. (forwarded request 855753 from bnavigator)</comment>
<requestid>857822</requestid>
</revision>
</revisionlist>
3 changes: 3 additions & 0 deletions packages/p/python-atspi/_multibuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>
13 changes: 13 additions & 0 deletions packages/p/python-atspi/python-atspi.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Mon Dec 14 12:42:27 UTC 2020 - Benjamin Greiner <[email protected]>

- Support future multiple python3 flavors
* fix py*atspi provides
* remove %ifpython3 -- it will break
* gh#openSUSE/python-rpm-macros#66
- Enable testsuite. General rule for python packages: must run if
they are available. And it revealed a problem with the
(not given) path to the python interpreter.
* The test suite compiles test libraries which do not work for
armv7l and ppc64le. Skip there.

-------------------------------------------------------------------
Mon Sep 14 12:53:33 UTC 2020 - [email protected]

Expand Down
59 changes: 44 additions & 15 deletions packages/p/python-atspi/python-atspi.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,32 @@
#


%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
# the test suite builds platform specific libraries, failing on some
ExcludeArch: %arm ppc64le
%define configureargs --enable-tests
%else
%define psuffix %{nil}
%bcond_with test
# the resulting python library is pure
BuildArch: noarch
%endif


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define _name pyatspi
Name: python-atspi
Name: python-atspi%{psuffix}
Version: 2.38.0
Release: 0
Summary: Python bindings for the Assistive Technology Service Provider Interface
License: LGPL-2.0-only
Group: Development/Libraries/Python
URL: http://www.gnome.org/
URL: https://gitlab.gnome.org/GNOME/pyatspi2
Source0: https://download.gnome.org/sources/pyatspi/2.38/%{_name}-%{version}.tar.xz

BuildRequires: %{python_module devel}
BuildRequires: %{python_module dbus-python}
BuildRequires: %{python_module gobject >= 2.90.1}
BuildRequires: %{python_module gobject-devel >= 2.90.1}
BuildRequires: %{python_module setuptools}
Expand All @@ -37,26 +51,29 @@ BuildRequires: gobject-introspection
BuildRequires: python-rpm-macros
BuildRequires: python3-2to3
BuildRequires: pkgconfig(gtk+-3.0)
%if %{with test}
BuildRequires: at-spi2-atk-gtk2
BuildRequires: at-spi2-core
BuildRequires: atk-devel
BuildRequires: glib2-devel
BuildRequires: libxml2-devel
%endif
Requires: python-dbus-python
Requires: python-gobject >= 2.90.1
# The bindings are really useful only if the at-spi registry is running. But
# it's not a strict runtime dependency.
Recommends: at-spi2-core
# Old versions of at-spi 1.x provided the same files
Conflicts: at-spi < 1.29.3
BuildArch: noarch
%ifpython2
Requires: dbus-1-python
%endif
%ifpython3
Requires: dbus-1-python3
%endif
# Virtual package, so that apps can depend on it, without having to know which
# at-spi stack is used. Only the default at-spi stack should define it.
# DEPRECATED: For python packages, use Requires: python-pyatspi and let the
# python_subpackages macro figure out the correct package.
%ifpython2
Provides: py2atspi
Provides: pyatspi
%endif
%ifpython3
%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"
Provides: py3atspi
%endif
%python_subpackages
Expand All @@ -76,23 +93,35 @@ This package contains the python bindings for AT-SPI.

%{python_expand mkdir build_%{$python_bin_suffix}
pushd build_%{$python_bin_suffix}
export PYTHON=$python
%configure
export PYTHON=%_bindir/$python
%configure %{?configureargs}
make %{?_smp_mflags}
popd
}


%install
%if ! %{with test}
%{python_expand pushd build_%{$python_bin_suffix}
%make_install
popd
}

%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif

%if %{with test}
%check
%{python_expand pushd build_%{$python_bin_suffix}/tests
dbus-run-session make %{?_smp_mflags} check CFLAGS="-Wno-return-type" || (cat pyatspi/test-suite.log && exit 1)
popd
}
%endif

%if ! %{with test}
%files %{python_files}
%license COPYING
%doc AUTHORS NEWS README
%{python_sitelib}/pyatspi/
%endif

%changelog

0 comments on commit ce97a82

Please sign in to comment.