Accepting request 1074162 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1074162 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-xcffib?expand=0&rev=12
This commit is contained in:
commit
7297d027bf
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>
|
||||
|
||||
|
@ -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
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,27 +16,39 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-xcffib
|
||||
Version: 0.12.1
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
|
||||
Name: python-xcffib%{?psuffix}
|
||||
Version: 1.2.0
|
||||
Release: 0
|
||||
Summary: A drop in replacement for xpyb, an XCB python binding
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/tych0/xcffib
|
||||
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 pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module six}
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module xcffib}
|
||||
%endif
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libxcb-devel
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: xeyes
|
||||
BuildRequires: xvfb-run
|
||||
Requires: python-cffi >= 1.1.0
|
||||
Requires: python-six
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@ -45,22 +57,30 @@ The xcffib package is intended to be a (mostly) drop-in
|
||||
replacement for xpyb.
|
||||
|
||||
%prep
|
||||
%setup -q -n xcffib-%{version}
|
||||
%autosetup -p1 -n xcffib-%{version}
|
||||
|
||||
%build
|
||||
%if !%{with test}
|
||||
%python_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%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}
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{python_sitelib}/xcffib/
|
||||
%{python_sitelib}/xcffib-%{version}-py*.egg-info
|
||||
%endif
|
||||
|
||||
%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