forked from pool/python-pyscreenshot
90 lines
2.8 KiB
RPMSpec
90 lines
2.8 KiB
RPMSpec
![]() |
#
|
||
|
# spec file for package python-pyscreenshot
|
||
|
#
|
||
|
# Copyright (c) 2020 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/
|
||
|
#
|
||
|
|
||
|
|
||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||
|
%define skip_python2 1
|
||
|
Name: python-pyscreenshot
|
||
|
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
|
||
|
Requires: python-mss
|
||
|
Requires: xorg-x11-server-extra
|
||
|
Recommends: ImageMagick
|
||
|
Recommends: maim
|
||
|
Suggests: gnome-screenshot
|
||
|
Suggests: python-wxPython
|
||
|
Suggests: scrot
|
||
|
BuildArch: noarch
|
||
|
%python_subpackages
|
||
|
|
||
|
%description
|
||
|
The pyscreenshot module can be used to copy the contents of the screen
|
||
|
to a Pillow image memory using various back-ends.
|
||
|
Replacement for the ImageGrab Module.
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n pyscreenshot-%{version}
|
||
|
|
||
|
%build
|
||
|
%python_build
|
||
|
|
||
|
%install
|
||
|
%python_install
|
||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||
|
|
||
|
%check
|
||
|
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'
|
||
|
|
||
|
%files %{python_files}
|
||
|
%doc README.md
|
||
|
%license LICENSE.txt
|
||
|
%{python_sitelib}/*
|
||
|
|
||
|
%changelog
|