20
0

Accepting request 989091 from home:uncomfyhalomacro

Uses %python_alternative. The other one has a wrong spec

OBS-URL: https://build.opensuse.org/request/show/989091
OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/python-pywayland?expand=0&rev=1
This commit is contained in:
2022-07-17 13:28:15 +00:00
committed by Git OBS Bridge
commit c827859706
6 changed files with 154 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
-------------------------------------------------------------------
Wed Jul 13 09:13:39 UTC 2022 - Soc Virnyl Estela <socvirnyl.estela@gmail.com>
- Rename the package to python-pywayland and make it single spec.
This is to enable building for all python flavors.
-------------------------------------------------------------------
Tue Jul 12 14:45:56 UTC 2022 - Soc Virnyl Estela <socvirnyl.estela@gmail.com>
- add fix-wayland-paths.patch
- remove 0001-fix-path-to-wayland-files-for-tests.patch
- remove 0000-fix-code-path-to-wayland-files.patch
- reenabled tests
-------------------------------------------------------------------
Thu Jul 7 06:07:12 UTC 2022 - Soc Virnyl Estela <socvirnyl.estela@gmail.com>
- Initial spec for python3-pywayland 0.4.13
- add 0001-fix-path-to-wayland-files-for-tests.patch:
* python-cffi cannot use pkg-config to check where
wayland devel files and headers are
- add 0000-fix-code-path-to-wayland-files.patch
* python-cffi cannot use pkg-config to check where
wayland devel files and headers are
- disabling tests. not compatible with OBS
+89
View File
@@ -0,0 +1,89 @@
#
# spec file python-pywayland
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_without test
%define pyname pywayland
Name: python-%{pyname}
Version: 0.4.13
Release: 0
Summary: Python binding to the wayland library using cffi
License: NCSA
Group: Development/Libraries/Python
URL: https://github.com/flacjacket/pywlroots
Source0: https://files.pythonhosted.org/packages/source/p/pywayland/pywayland-%{version}.tar.gz
Patch0: fix-wayland-paths.patch
BuildRequires: %{python_module cffi}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module distutils-extra}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(wayland-client) >= 1.21
BuildRequires: pkgconfig(wayland-cursor) >= 1.21
BuildRequires: pkgconfig(wayland-protocols) >= 1.25
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
Python binding to the wayland library using cffi.
%prep
%setup -q -n pywayland-%{version}
%patch0 -p1
%build
export CFLAGS="-I/usr/include/wayland ${CFLAGS}"
%python_exec pywayland/ffi_build.py
%python_build
%install
export CFLAGS="-I/usr/include/wayland ${CFLAGS}"
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%python_clone -a %{buildroot}%{_bindir}/pywayland-scanner
%if %{with test}
%check
mkdir -p %{buildroot}/fake-xdg-runtime-dir
export XDG_RUNTIME_DIR=%{buildroot}/fake-xdg-runtime-dir
export CFLAGS="-I/usr/include/wayland ${CFLAGS}"
%python_exec -m pywayland.scanner
%pytest -vv
rm -rfv ${XDG_RUNTIME_DIR}
%endif
%post
%python_install_alternative pywayland-scanner
%postun
%python_uninstall_alternative pywayland-scanner
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitearch}/*
%python_alternative %{_bindir}/pywayland-scanner
%changelog
+24
View File
@@ -0,0 +1,24 @@
*.changes merge=merge-changes
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
+4
View File
@@ -0,0 +1,4 @@
*.obscpio
*.osc
_build.*
.pbuild
+9
View File
@@ -0,0 +1,9 @@
--- ./setup.py.orig 2022-07-12 22:44:49.776811649 +0800
+++ ./setup.py 2022-07-12 22:45:13.360596245 +0800
@@ -170,5 +170,6 @@
long_description=long_description,
long_description_content_type="text/x-rst",
cmdclass=cmdclass,
+ include_dirs=["/usr/include/wayland"],
cffi_modules=["pywayland/ffi_build.py:ffi_builder"],
)
+3
View File
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c74ef90a772f7e3cdb22c18c8f61301698a0a70972b2a059a682b4f035bd881a
size 203303