1
0
forked from pool/python-odorik

Compare commits

...

11 Commits

Author SHA256 Message Date
8e1812e7a7 Accepting request 1158766 from devel:languages:python
- Add assertEquals.patch replacing assertEquals with assertEqual
  (incompatible with Python 3.12).

OBS-URL: https://build.opensuse.org/request/show/1158766
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-odorik?expand=0&rev=10
2024-03-17 21:17:02 +00:00
07c4c57e1f Update patch from upstream.
d90f3a6cd7

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-odorik?expand=0&rev=20
2024-03-17 09:06:32 +00:00
b0b60a46e1 - Add assertEquals.patch replacing assertEquals with assertEqual
(incompatible with Python 3.12).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-odorik?expand=0&rev=19
2024-03-17 09:03:57 +00:00
e2cf84fdb0 Accepting request 1009643 from devel:languages:python
- Remove unneeded BuildRequires on python

OBS-URL: https://build.opensuse.org/request/show/1009643
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-odorik?expand=0&rev=9
2022-10-12 16:24:14 +00:00
a17f0c2512 - Remove unneeded BuildRequires on python
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-odorik?expand=0&rev=17
2022-10-11 02:16:59 +00:00
3c8650779f Accepting request 807934 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/807934
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-odorik?expand=0&rev=8
2020-06-09 22:41:42 +00:00
Tomáš Chvátal
3196a5477a Accepting request 807904 from home:pgajdos:python
submit

OBS-URL: https://build.opensuse.org/request/show/807904
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-odorik?expand=0&rev=15
2020-05-21 08:59:13 +00:00
627c471776 Accepting request 632136 from devel:languages:python
- Fix build on 42.3 by calling pytest properly and adding dependency
  on ssl module from python2 main package

OBS-URL: https://build.opensuse.org/request/show/632136
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-odorik?expand=0&rev=7
2018-08-31 08:46:02 +00:00
Tomáš Chvátal
cfcc5ea21f - Fix build on 42.3 by calling pytest properly and adding dependency
on ssl module from python2 main package

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-odorik?expand=0&rev=13
2018-08-29 10:54:50 +00:00
3f204ba88a Accepting request 611358 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/611358
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-odorik?expand=0&rev=6
2018-05-29 14:49:41 +00:00
Tomáš Chvátal
1873af21f0 Accepting request 611351 from devel:languages:python:singlespec-staging
clean SPEC file

OBS-URL: https://build.opensuse.org/request/show/611351
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-odorik?expand=0&rev=11
2018-05-22 16:40:58 +00:00
3 changed files with 176 additions and 28 deletions

99
assertEquals.patch Normal file
View File

@@ -0,0 +1,99 @@
From d90f3a6cd76972a4a059ba33141ba94c61fec5f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= <michal@cihar.com>
Date: Fri, 4 Jan 2019 13:31:32 +0100
Subject: [PATCH] Avoid using deprecated assertEquals
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Michal Čihař <michal@cihar.com>
---
odorik/test_main.py | 4 ++--
odorik/test_odorik.py | 14 +++++++-------
2 files changed, 9 insertions(+), 9 deletions(-)
--- a/odorik/test_main.py
+++ b/odorik/test_main.py
@@ -392,7 +392,7 @@ class TestCommands(TestCase):
'00420789123456',
'text'
])
- self.assertEquals('', output)
+ self.assertEqual('', output)
@httpretty.activate
def test_send_sms_invalid(self):
@@ -411,7 +411,7 @@ class TestCommands(TestCase):
output = execute([
'callback', '00420789123456', '800123456'
])
- self.assertEquals('', output)
+ self.assertEqual('', output)
@httpretty.activate
def test_summary(self):
--- a/odorik/test_odorik.py
+++ b/odorik/test_odorik.py
@@ -206,7 +206,7 @@ class OdorikTest(TestCase):
def test_sms_send(self):
"""Test sending SMS."""
register_uris()
- self.assertEquals(
+ self.assertEqual(
Odorik().send_sms(
'00420789123456',
'text'
@@ -230,7 +230,7 @@ class OdorikTest(TestCase):
def test_callback(self):
"""Test callback."""
register_uris()
- self.assertEquals(
+ self.assertEqual(
Odorik().callback(
'00420789123456',
'800123456'
@@ -242,7 +242,7 @@ class OdorikTest(TestCase):
def test_callback_line(self):
"""Test callback."""
register_uris()
- self.assertEquals(
+ self.assertEqual(
Odorik().callback(
'00420789123456',
'800123456',
@@ -255,7 +255,7 @@ class OdorikTest(TestCase):
def test_calls(self):
"""Test calls."""
register_uris()
- self.assertEquals(
+ self.assertEqual(
len(Odorik().calls(
datetime.datetime.now(),
datetime.datetime.now(),
@@ -267,7 +267,7 @@ class OdorikTest(TestCase):
def test_calls_line(self):
"""Test calls."""
register_uris()
- self.assertEquals(
+ self.assertEqual(
len(Odorik().calls(
datetime.datetime.now(),
datetime.datetime.now(),
@@ -280,7 +280,7 @@ class OdorikTest(TestCase):
def test_sms(self):
"""Test sms."""
register_uris()
- self.assertEquals(
+ self.assertEqual(
len(Odorik().sms(
datetime.datetime.now(),
datetime.datetime.now(),
@@ -292,7 +292,7 @@ class OdorikTest(TestCase):
def test_sms_line(self):
"""Test sms."""
register_uris()
- self.assertEquals(
+ self.assertEqual(
len(Odorik().sms(
datetime.datetime.now(),
datetime.datetime.now(),

View File

@@ -1,3 +1,37 @@
-------------------------------------------------------------------
Fri Mar 15 17:26:55 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Add assertEquals.patch replacing assertEquals with assertEqual
(incompatible with Python 3.12).
-------------------------------------------------------------------
Tue Oct 11 02:16:31 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
- Remove unneeded BuildRequires on python
-------------------------------------------------------------------
Thu May 21 06:55:36 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
-------------------------------------------------------------------
Wed Aug 29 10:54:27 UTC 2018 - tchvatal@suse.com
- Fix build on 42.3 by calling pytest properly and adding dependency
on ssl module from python2 main package
-------------------------------------------------------------------
Tue May 22 15:36:31 UTC 2018 - mcepl@suse.com
- clean SPEC file
- binaries and manpages are only in python3- package
- tests are run for both versions of Python
-------------------------------------------------------------------
Thu Aug 24 13:47:07 UTC 2017 - jmatejek@suse.com
- singlespec auto-conversion
-------------------------------------------------------------------
Fri Feb 26 13:12:45 UTC 2016 - tbechtold@suse.com
@@ -40,3 +74,4 @@ Fri May 15 13:15:32 UTC 2015 - mcihar@suse.cz
- Initial packaging.

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-odorik
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
# 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/
#
@@ -20,48 +20,62 @@ Name: python-odorik
Version: 0.5
Release: 0
Summary: Python module for Odorik API
License: GPL-3.0+
Group: Development/Languages/Python
Url: http://cihar.com/software/odorik/
Source: https://pypi.python.org/packages/source/o/odorik/odorik-%{version}.tar.bz2
BuildRequires: python-devel
BuildRequires: python-httpretty
BuildRequires: python-pytest
BuildRequires: python-python-dateutil
BuildRequires: python-sphinx
BuildRequires: python-xdg
License: GPL-3.0-or-later
URL: https://cihar.com/software/odorik/
Source: https://files.pythonhosted.org/packages/source/o/odorik/odorik-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE assertEquals.patch mcepl@suse.com
# 3.12 finally removed assertEquals method
# Patch from gh#nijel/odorik#d90f3a6cd76972
Patch0: assertEquals.patch
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module httpretty}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module pyxdg}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-python-dateutil
Requires: python-xdg
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%endif
%python_subpackages
%description
Python module to work with Odorik API.
%prep
%setup -q -n odorik-%{version}
%autosetup -p1 -n odorik-%{version}
%build
python setup.py build
make -C docs man
%pyproject_wheel
%make_build -C docs man
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%pyproject_install
install -d %{buildroot}%{_mandir}/man1
install -m 644 docs/_build/man/odorik.1 %{buildroot}%{_mandir}/man1
%python_clone -a %{buildroot}%{_bindir}/odorik
%python_clone -a %{buildroot}%{_mandir}/man1/odorik.1
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
py.test odorik
%pytest odorik
%files
%defattr(-,root,root,-)
%doc NEWS.rst LICENSE README.rst
%{python_sitelib}/*
%{_mandir}/man1/*
%{_bindir}/*
%post
%python_install_alternative odorik odorik.1
%postun
%python_uninstall_alternative odorik
%files %{python_files}
%license LICENSE
%doc NEWS.rst README.rst
%python_alternative %{_mandir}/man1/odorik.1%{ext_man}
%python_alternative %{_bindir}/odorik
%{python_sitelib}/odorik
%{python_sitelib}/odorik-%{version}*-info
%changelog