15
0
forked from pool/python-irc

- Sync with python-irclib package -> provides/obsoletes fun

- Add patch fix-lint.patch to fix lint error
- Update version to 17.0:
  * Support for py3.7
- Drop support for python2, dropped by upstream

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-irc?expand=0&rev=4
This commit is contained in:
Tomáš Chvátal
2019-01-18 12:28:25 +00:00
committed by Git OBS Bridge
parent 9f5a0f53b7
commit f416559eb4
5 changed files with 65 additions and 63 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-irc
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,96 +12,77 @@
# 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/
#
%define _name irc
%define modname irc
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-irc
Version: 16.4
Version: 17.0
Release: 0
Summary: IRC (Internet Relay Chat) protocol client library for Python
License: MIT
Group: Development/Languages/Python
Url: https://github.com/jaraco/irc
Source: https://files.pythonhosted.org/packages/source/i/%{_name}/%{_name}-%{version}.tar.gz
Summary: A set of Python modules for IRC support
License: LGPL-2.1-or-later
Group: Development/Libraries/Python
URL: https://github.com/jaraco/irc
Source: https://files.pythonhosted.org/packages/source/i/irc/%{modname}-%{version}.tar.gz
Patch0: fix-lint.patch
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module jaraco.base}
BuildRequires: %{python_module jaraco.collections}
BuildRequires: %{python_module jaraco.functools}
BuildRequires: %{python_module jaraco.itertools}
BuildRequires: %{python_module jaraco.logging}
BuildRequires: %{python_module jaraco.stream}
BuildRequires: %{python_module jaraco.packaging}
BuildRequires: %{python_module jaraco.text}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
# SECTION documentation requirements
BuildRequires: dos2unix
BuildRequires: python3-Sphinx
BuildRequires: python3-jaraco.packaging
BuildRequires: python3-rst.linker
# /SECTION
# SECTION test requirements
BuildRequires: %{python_module pytest-flake8}
BuildRequires: %{python_module more-itertools}
BuildRequires: %{python_module pygments}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module rst.linker}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module six}
BuildRequires: %{python_module tempora}
BuildRequires: python2-backports.functools_lru_cache
BuildRequires: python2-backports.unittest_mock
# /SECTION
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-jaraco.collections
Requires: python-jaraco.functools
Requires: python-jaraco.itertools
Requires: python-jaraco.logging
Requires: python-jaraco.stream
Requires: python-jaraco.text
Requires: python-pytz
Requires: python-six
Provides: python-irclib = %{version}
Obsoletes: %{name}-doc
Obsoletes: python-irclib < %{version}
BuildArch: noarch
%if 0%{?suse_version} > 1500
BuildRequires: %{python_module jaraco.stream}
BuildRequires: %{python_module pytest-flake8}
BuildRequires: %{python_module pytest-sugar}
%endif
%python_subpackages
%description
This library is intended to encapsulate the IRC protocol at a quite
low level. It provides an event-driven IRC client framework. It
has a fairly thorough support for the basic IRC protocol, CTCP and
DCC connections.
%package -n %{name}-doc
Summary: Documentation for %{name}
Group: Documentation/HTML
Requires: %{name} = %{version}
Provides: %{python_module irc-doc = %{version}}
%description -n %{name}-doc
This package contains documentation files for %{name}.
low level. It provides an event-driven IRC client framework. It has
a fairly thorough support for the basic IRC protocol, CTCP and DCC
connections.
%prep
%setup -q -n %{_name}-%{version}
rm -rf irc.egg-info
dos2unix docs/irc.rst docs/irc.tests.rst
%setup -q -n %{modname}-%{version}
%patch0 -p1
sed -i -e '1s!/env python!/python!' scripts/testbot.py
%build
%python_build
%{_python_use_flavor python3}
%__python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if 0%{?suse_version} > 1500
%check
%{python_expand rm ./build/lib/irc/tests/test_client.py
$python %{_bindir}/py.test build/lib/irc
}
%python_exec setup.py pytest
%endif
%files %{python_files}
%{python_sitelib}/*
%doc README.rst
%license LICENSE
%files -n %{name}-doc
%doc build/sphinx/html
%doc CHANGES.rst README.rst
%doc scripts/
%{python_sitelib}/irc*
%changelog