forked from pool/python-pyscreenshot
- Switch to multibuild to avoid build cycles
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyscreenshot?expand=0&rev=2
This commit is contained in:
committed by
Git OBS Bridge
parent
b7349deb0b
commit
86a513074c
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 25 07:58:12 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Switch to multibuild to avoid build cycles
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 1 02:36:27 PM UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
|
@@ -18,36 +18,24 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-pyscreenshot
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
Name: python-pyscreenshot%{psuffix}
|
||||
Version: 2.2
|
||||
Release: 0
|
||||
Summary: Python screenshots
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/ponty/pyscreenshot
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pyscreenshot/pyscreenshot-%{version}.tar.gz
|
||||
BuildRequires: %{python_module EasyProcess}
|
||||
BuildRequires: %{python_module Pillow}
|
||||
BuildRequires: %{python_module PyVirtualDisplay}
|
||||
BuildRequires: %{python_module decorator}
|
||||
BuildRequires: %{python_module entrypoint2}
|
||||
BuildRequires: %{python_module jeepney}
|
||||
BuildRequires: %{python_module mss}
|
||||
BuildRequires: %{python_module path.py}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module python-xlib}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wxPython}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: ImageMagick
|
||||
BuildRequires: gnome-screenshot
|
||||
BuildRequires: maim
|
||||
BuildRequires: pqiv-gdkpixbuf
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: xdpyinfo
|
||||
BuildRequires: xmessage
|
||||
BuildRequires: xorg-x11-server-extra
|
||||
BuildRequires: xvfb-run
|
||||
Requires: python-EasyProcess
|
||||
Requires: python-entrypoint2
|
||||
Requires: python-jeepney
|
||||
@@ -59,6 +47,29 @@ Suggests: gnome-screenshot
|
||||
Suggests: python-wxPython
|
||||
Suggests: scrot
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module EasyProcess}
|
||||
BuildRequires: %{python_module Pillow}
|
||||
BuildRequires: %{python_module PyVirtualDisplay}
|
||||
BuildRequires: %{python_module decorator}
|
||||
BuildRequires: %{python_module entrypoint2}
|
||||
BuildRequires: %{python_module jeepney}
|
||||
BuildRequires: %{python_module mss}
|
||||
BuildRequires: %{python_module path.py}
|
||||
BuildRequires: %{python_module pyscreenshot >= %{version}}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module python-xlib}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wxPython}
|
||||
BuildRequires: ImageMagick
|
||||
BuildRequires: gnome-screenshot
|
||||
BuildRequires: maim
|
||||
BuildRequires: pqiv-gdkpixbuf
|
||||
BuildRequires: xdpyinfo
|
||||
BuildRequires: xmessage
|
||||
BuildRequires: xorg-x11-server-extra
|
||||
BuildRequires: xvfb-run
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -73,17 +84,23 @@ Replacement for the ImageGrab Module.
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
cd tests/
|
||||
# test_maim fails on Leap 15.x
|
||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} xvfb-run --server-args "-screen 0 1920x1080x24" $python -m pytest -rs -v test_*.py -k 'not test_maim'
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE.txt
|
||||
%{python_sitelib}/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user