Accepting request 1073955 from home:pgajdos:python
- version update to 1.2.0
* no upstream changelog found
- do not require six
- added patches
fix 8a488867d3
+ python-xcffib-six-leftover.patch
fix ffi import [bsc#1209570c4]
+ python-xcffib-ffi-import.patch
OBS-URL: https://build.opensuse.org/request/show/1073955
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xcffib?expand=0&rev=24
This commit is contained in:
parent
04a3847ebf
commit
664e81bc05
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
23
python-xcffib-ffi-import.patch
Normal file
23
python-xcffib-ffi-import.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Index: xcffib-1.2.0/test/test_python_code.py
|
||||||
|
===================================================================
|
||||||
|
--- xcffib-1.2.0.orig/test/test_python_code.py
|
||||||
|
+++ xcffib-1.2.0/test/test_python_code.py
|
||||||
|
@@ -19,7 +19,6 @@ import xcffib.xinput
|
||||||
|
import os
|
||||||
|
import struct
|
||||||
|
import sys
|
||||||
|
-from xcffib._ffi import ffi
|
||||||
|
from xcffib.xproto import EventMask
|
||||||
|
|
||||||
|
from .conftest import XcffibTest
|
||||||
|
@@ -176,8 +175,8 @@ class TestPythonCode:
|
||||||
|
)
|
||||||
|
|
||||||
|
# Create cdata from the bytearray and cast it to a generic reply
|
||||||
|
- cdata = ffi.new("char x[72]", B_HIT_EVENT)
|
||||||
|
- generic_reply = ffi.cast("xcb_generic_reply_t *", cdata)
|
||||||
|
+ cdata = xcffib.ffi.new("char x[72]", B_HIT_EVENT)
|
||||||
|
+ generic_reply = xcffib.ffi.cast("xcb_generic_reply_t *", cdata)
|
||||||
|
|
||||||
|
# Pass the reply to our hoist_event method
|
||||||
|
event = xcffib_test.conn.hoist_event(generic_reply)
|
13
python-xcffib-six-leftover.patch
Normal file
13
python-xcffib-six-leftover.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/test/test_python_code.py b/test/test_python_code.py
|
||||||
|
index f8568b4..5aa67ff 100644
|
||||||
|
--- a/test/test_python_code.py
|
||||||
|
+++ b/test/test_python_code.py
|
||||||
|
@@ -17,7 +17,6 @@
|
||||||
|
import xcffib.xproto
|
||||||
|
import xcffib.xinput
|
||||||
|
import os
|
||||||
|
-import six
|
||||||
|
import struct
|
||||||
|
import sys
|
||||||
|
from xcffib._ffi import ffi
|
||||||
|
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 23 09:19:27 UTC 2023 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- version update to 1.2.0
|
||||||
|
* no upstream changelog found
|
||||||
|
- do not require six
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/tych0/xcffib/commit/8a488867d30464913706376ca3a9f4c98ca6c5cf
|
||||||
|
+ python-xcffib-six-leftover.patch
|
||||||
|
fix ffi import [bsc#1209570c4]
|
||||||
|
+ python-xcffib-ffi-import.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 27 16:04:01 UTC 2022 - Markéta Machová <mmachova@suse.com>
|
Tue Sep 27 16:04:01 UTC 2022 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-xcffib
|
# spec file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,27 +16,39 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%define skip_python2 1
|
%if "%{flavor}" == "test"
|
||||||
Name: python-xcffib
|
%define psuffix -test
|
||||||
Version: 0.12.1
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: python-xcffib%{?psuffix}
|
||||||
|
Version: 1.2.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A drop in replacement for xpyb, an XCB python binding
|
Summary: A drop in replacement for xpyb, an XCB python binding
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/tych0/xcffib
|
URL: https://github.com/tych0/xcffib
|
||||||
Source: https://files.pythonhosted.org/packages/source/x/xcffib/xcffib-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/x/xcffib/xcffib-%{version}.tar.gz
|
||||||
|
# https://github.com/tych0/xcffib/commit/8a488867d30464913706376ca3a9f4c98ca6c5cf
|
||||||
|
Patch0: python-xcffib-six-leftover.patch
|
||||||
|
# fix ffi import [bsc#1209570c4]
|
||||||
|
Patch1: python-xcffib-ffi-import.patch
|
||||||
BuildRequires: %{python_module cffi >= 1.1.0}
|
BuildRequires: %{python_module cffi >= 1.1.0}
|
||||||
BuildRequires: %{python_module pytest}
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six}
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module xcffib}
|
||||||
|
%endif
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: libxcb-devel
|
BuildRequires: libxcb-devel
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: xeyes
|
BuildRequires: xeyes
|
||||||
BuildRequires: xvfb-run
|
BuildRequires: xvfb-run
|
||||||
Requires: python-cffi >= 1.1.0
|
Requires: python-cffi >= 1.1.0
|
||||||
Requires: python-six
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -45,22 +57,30 @@ The xcffib package is intended to be a (mostly) drop-in
|
|||||||
replacement for xpyb.
|
replacement for xpyb.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n xcffib-%{version}
|
%autosetup -p1 -n xcffib-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if !%{with test}
|
||||||
%python_build
|
%python_build
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if !%{with test}
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} xvfb-run pytest-%{$python_bin_suffix} -v
|
%if %{with test}
|
||||||
|
%pytest
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{python_sitelib}/xcffib/
|
%{python_sitelib}/xcffib/
|
||||||
%{python_sitelib}/xcffib-%{version}-py*.egg-info
|
%{python_sitelib}/xcffib-%{version}-py*.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:82fc55d7530d05d25506e77891ddbae2727ff30aca32b9c98845030ea379f17f
|
|
||||||
size 85272
|
|
3
xcffib-1.2.0.tar.gz
Normal file
3
xcffib-1.2.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f323021447f9e73078d21bb928c48f4dabeaeb3f3b37e803c6d6b98735e81483
|
||||||
|
size 88972
|
Loading…
x
Reference in New Issue
Block a user