Blame python-pywlroots.spec

d4ae46
#
d4ae46
# spec file for package python-pywlroots
d4ae46
#
d4ae46
# Copyright (c) 2022 SUSE LLC
d4ae46
#
d4ae46
# All modifications and additions to the file contributed by third parties
d4ae46
# remain the property of their copyright owners, unless otherwise agreed
d4ae46
# upon. The license for this file, and modifications and additions to the
d4ae46
# file, is the same license as for the pristine package itself (unless the
d4ae46
# license for the pristine package is not an Open Source License, in which
d4ae46
# case the license is the MIT License). An "Open Source License" is a
d4ae46
# license that conforms to the Open Source Definition (Version 1.9)
d4ae46
# published by the Open Source Initiative.
d4ae46
d4ae46
# Please submit bugfixes or comments via https://bugs.opensuse.org/
d4ae46
#
d4ae46
d4ae46
d4ae46
%bcond_without test
d4ae46
Name:           python-pywlroots
0dcacc
Version:        0.15.19
d4ae46
Release:        0
d4ae46
Summary:        Python binding to the wlroots library using cffi
d4ae46
License:        NCSA
d4ae46
Group:          Development/Languages/Python
d4ae46
URL:            https://github.com/flacjacket/pywlroots
d4ae46
Source0:        https://files.pythonhosted.org/packages/source/p/pywlroots/pywlroots-%{version}.tar.gz
d4ae46
Source1:        python-pywlroots-rpmlintrc
d4ae46
Patch0:         fix-include-paths.patch
d4ae46
BuildRequires:  %{python_module cffi}
0dcacc
BuildRequires:  %{python_module devel}
d4ae46
BuildRequires:  %{python_module distutils-extra}
d4ae46
BuildRequires:  %{python_module pip}
d4ae46
BuildRequires:  %{python_module pytest}
0dcacc
BuildRequires:  %{python_module pywayland >= 0.4.14}
d4ae46
BuildRequires:  %{python_module setuptools}
d4ae46
BuildRequires:  %{python_module wheel}
d4ae46
BuildRequires:  %{python_module xkbcommon}
0dcacc
BuildRequires:  %{pythons}
0dcacc
BuildRequires:  fdupes
0dcacc
BuildRequires:  libwlroots10
0dcacc
BuildRequires:  python-rpm-macros
d4ae46
BuildRequires:  pkgconfig(glib-2.0)
d4ae46
BuildRequires:  pkgconfig(wlroots)
d4ae46
BuildRequires:  pkgconfig(xkbcommon)
d4ae46
BuildRequires:  pkgconfig(xwayland)
d4ae46
Requires:       python-pywayland
d4ae46
Requires:       python-xkbcommon
d4ae46
%python_subpackages
d4ae46
d4ae46
%description
d4ae46
Python binding to the wlroots library using cffi.
d4ae46
d4ae46
%prep
d4ae46
%setup -q -n pywlroots-%{version}
d4ae46
%patch0 -p1
d4ae46
d4ae46
%build
d4ae46
export CFLAGS="-I/usr/include/wayland -I/usr/include/libdrm -I/usr/include/libxkbcommon -I/usr/include/pixman-1 -I/usr/include/libinput $CFLAGS"
d4ae46
%python_exec wlroots/ffi_build.py
d4ae46
%pyproject_wheel
d4ae46
d4ae46
%install
d4ae46
export CFLAGS="-I/usr/include/wayland -I/usr/include/libdrm -I/usr/include/libxkbcommon -I/usr/include/pixman-1 -I/usr/include/libinput $CFLAGS"
d4ae46
%python_exec wlroots/ffi_build.py
d4ae46
%pyproject_install
d4ae46
d4ae46
%python_expand %fdupes %{buildroot}%{$python_sitearch}
d4ae46
d4ae46
%if %{with test}
d4ae46
%check
d4ae46
export CFLAGS="-I/usr/include/wayland -I/usr/include/libdrm -I/usr/include/libxkbcommon -I/usr/include/pixman-1 -I/usr/include/libinput $CFLAGS"
d4ae46
%pytest -vv
d4ae46
%endif
d4ae46
d4ae46
%files %{python_files}
d4ae46
%license LICENSE
d4ae46
%doc README.rst
d4ae46
%{python_sitearch}/*wlroots*/
d4ae46
d4ae46
%changelog