14
0
forked from pool/python-xcffib

- Update to 0.7.0:

* Various updates and fixes for ghc/cabal
  * Drop unnecessary imports
- Enable tests

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xcffib?expand=0&rev=8
This commit is contained in:
Tomáš Chvátal
2019-03-04 12:11:47 +00:00
committed by Git OBS Bridge
parent 6e587759ae
commit a2b8552134
4 changed files with 21 additions and 15 deletions

View File

@@ -12,33 +12,31 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Missing files for tests
%bcond_with tests
Name: python-xcffib
Version: 0.6.0
Version: 0.7.0
Release: 0
Summary: A drop in replacement for xpyb, an XCB python binding
License: Apache-2.0
Group: Development/Languages/Python
URL: http://github.com/tych0/xcffib
Source: https://files.pythonhosted.org/packages/source/x/xcffib/xcffib-%{version}.tar.gz
BuildRequires: %{python_module cffi}
BuildRequires: %{python_module cffi >= 1.1.0}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: libxcb-devel
BuildRequires: python-rpm-macros
Requires: python-cffi
BuildRequires: xeyes
BuildRequires: xvfb-run
Requires: python-cffi >= 1.1.0
Requires: python-six
BuildArch: noarch
%if %{with tests}
BuildRequires: %{python_module nose}
%endif
%python_subpackages
%description
@@ -47,18 +45,18 @@ replacement for xpyb.
%prep
%setup -q -n xcffib-%{version}
# upstream moves files compared to git repository
sed -i -e 's:from \.testing:from testing:g' test/*.py
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with tests}
%check
%python_expand nosetests-%{$python_bin_suffix}
%endif
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} xvfb-run nosetests-%{$python_bin_suffix} -v
%files %{python_files}
%license LICENSE