%define scl rh-python36 %{?scl:%scl_package %{name}} %{!?scl:%global pkg_name %{name}} %define name pyperclip %define version 1.7.0 %define unmangled_version 1.7.0 %define unmangled_version 1.7.0 %define release 1 Summary: A cross-platform clipboard module for Python. (Only handles plain text for now.) %{?scl:Requires: %{scl}-runtime} %{?scl:BuildRequires: %{scl}-runtime} Name: %{?scl_prefix}pyperclip Version: %{version} Release: %{release} Source0: pyperclip-%{unmangled_version}.tar.gz License: BSD Group: Development/Libraries BuildRoot: %{_tmppath}/pyperclip-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Al Sweigart Packager: Martin Juhl Url: https://github.com/asweigart/pyperclip %description Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with Python 2 and 3. `pip install pyperclip` Al Sweigart al@inventwithpython.com BSD License Example Usage ============= >>> import pyperclip >>> pyperclip.copy('The text to be copied to the clipboard.') >>> pyperclip.paste() 'The text to be copied to the clipboard.' Currently only handles plaintext. On Windows, no additional modules are needed. On Mac, this module makes use of the pbcopy and pbpaste commands, which should come with the os. On Linux, this module makes use of the xclip or xsel commands, which should come with the os. Otherwise run "sudo apt-get install xclip" or "sudo apt-get install xsel" (Note: xsel does not always seem to work.) Otherwise on Linux, you will need the gtk or PyQt4 modules installed. %prep %{?scl:scl enable %{scl} - << \EOF} set -ex %setup -n pyperclip-%{unmangled_version} -n pyperclip-%{unmangled_version} %{?scl:EOF} %build %{?scl:scl enable %{scl} - << \EOF} set -ex python3 setup.py build %{?scl:EOF} %install %{?scl:scl enable %{scl} - << \EOF} set -ex python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES %{?scl:EOF} %clean %{?scl:scl enable %{scl} - << \EOF} set -ex rm -rf $RPM_BUILD_ROOT %{?scl:EOF} %files -f INSTALLED_FILES %defattr(-,root,root)