Blame python-pyperclip.spec

6e27db
%global pypi_name pyperclip
6e27db
6e27db
6e27db
Name:           python-%{pypi_name}
6e27db
Version:        1.6.4
d08af8
Release:        5%{?dist}
6e27db
Summary:        A cross-platform clipboard module for Python
6e27db
6e27db
License:        BSD
6e27db
URL:            https://github.com/asweigart/pyperclip
6e27db
Source0:        https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
6e27db
# Fix tests suite execution
6e27db
# Disable all tests requiring a display or toolkit to be available at build time
6e27db
Patch001:       0001-Skip-tests-irrelevant-in-the-context-of-Fedora-packa.patch
6e27db
BuildArch:      noarch
6e27db
6e27db
BuildRequires:  git
6e27db
 
6e27db
%description
6e27db
Pyperclip is a cross-platform Python module for copy and paste clipboard
6e27db
functions.
6e27db
6e27db
%package -n     python3-%{pypi_name}
6e27db
Summary:        %{summary}
6e27db
%{?python_provide:%python_provide python3-%{pypi_name}}
6e27db
6e27db
BuildRequires:  python3-devel
6e27db
BuildRequires:  python3-setuptools
6e27db
6e27db
%description -n python3-%{pypi_name}
6e27db
Pyperclip is a cross-platform Python module for copy and paste clipboard
6e27db
functions.
6e27db
6e27db
6e27db
%package -n python-%{pypi_name}-doc
6e27db
Summary:        Pyperclip documentation
c0b010
BuildRequires:  python3-sphinx
6e27db
6e27db
%description -n python-%{pypi_name}-doc
6e27db
Documentation for pyperclip
6e27db
6e27db
6e27db
%prep
6e27db
%autosetup -n %{pypi_name}-%{version} -S git
6e27db
# Remove bundled egg-info
6e27db
rm -rf %{pypi_name}.egg-info
6e27db
6e27db
# Fix ends of line encoding
6e27db
sed -i 's/\r$//' README.md docs/*
6e27db
6e27db
%build
6e27db
%py3_build
6e27db
# generate html docs 
6e27db
PYTHONPATH=${PWD} sphinx-build docs html
6e27db
# remove the sphinx-build leftovers
6e27db
rm -rf html/.{doctrees,buildinfo}
6e27db
6e27db
%install
6e27db
%py3_install
6e27db
6e27db
%check
6e27db
%{__python3} setup.py test
6e27db
6e27db
6e27db
%files -n python3-%{pypi_name}
6e27db
%doc README.md
6e27db
%{python3_sitelib}/%{pypi_name}
6e27db
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
6e27db
6e27db
%files -n python-%{pypi_name}-doc
6e27db
%doc html
6e27db
6e27db
%changelog
d08af8
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.6.4-5
d08af8
- Rebuilt for Python 3.8
d08af8
c8bfac
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-4
c8bfac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c8bfac
c0b010
* Sun Mar 17 2019 Miro Hrončok <mhroncok@redhat.com> - 1.6.4-3
c0b010
- Subpackage python2-pyperclip has been removed
c0b010
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
c0b010
01b783
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.4-2
01b783
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
01b783
6e27db
* Wed Jul 25 2018 Haïkel Guémar <hguemar@fedoraproject.org> - 1.6.4-1
6e27db
- Initial package.