diff --git a/fix-lint.patch b/fix-lint.patch new file mode 100644 index 0000000..0dbbb85 --- /dev/null +++ b/fix-lint.patch @@ -0,0 +1,12 @@ +Index: irc-17.0/scripts/irccat2-aio.py +=================================================================== +--- irc-17.0.orig/scripts/irccat2-aio.py ++++ irc-17.0/scripts/irccat2-aio.py +@@ -70,6 +70,7 @@ def main(): + args.server, args.port, args.nickname, password=args.password + ) + except irc.client.ServerConnectionError as x: ++ print(x) + sys.exit(1) + + try: diff --git a/irc-16.4.tar.gz b/irc-16.4.tar.gz deleted file mode 100644 index 1ddf639..0000000 --- a/irc-16.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c161f8108246a60f1ea1f48fbbfeaba64d5c4ef9fe4d0663279c148d95804e50 -size 86909 diff --git a/irc-17.0.tar.gz b/irc-17.0.tar.gz new file mode 100644 index 0000000..68c27b1 --- /dev/null +++ b/irc-17.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9c5fcb72dd230e1387fd4a0114a1935605e0f59ac09dec962313baed74e1365 +size 86522 diff --git a/python-irc.changes b/python-irc.changes index 60b3a46..3681b42 100644 --- a/python-irc.changes +++ b/python-irc.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Jan 2 10:14:37 UTC 2019 - Tomáš Chvátal + +- 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 + ------------------------------------------------------------------- Tue Aug 28 08:22:43 UTC 2018 - dmueller@suse.com diff --git a/python-irc.spec b/python-irc.spec index b158ad1..8e20b60 100644 --- a/python-irc.spec +++ b/python-irc.spec @@ -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