14
0

Accepting request 986398 from home:mcepl:work

Access to MediaWiki.

OBS-URL: https://build.opensuse.org/request/show/986398
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mwclient?expand=0&rev=1
This commit is contained in:
2022-07-02 21:35:07 +00:00
committed by Git OBS Bridge
commit 3ba7a8b09f
6 changed files with 167 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

63
demock.patch Normal file
View File

@@ -0,0 +1,63 @@
---
setup.py | 2 +-
test/test_client.py | 2 +-
test/test_listing.py | 2 +-
test/test_page.py | 2 +-
test/test_sleep.py | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ setup(name='mwclient',
packages=['mwclient'],
install_requires=['requests-oauthlib', 'six'],
setup_requires=pytest_runner,
- tests_require=['pytest', 'pytest-cov', 'mock',
+ tests_require=['pytest', 'pytest-cov',
'responses>=0.3.0', 'responses!=0.6.0'],
zip_safe=True
)
--- a/test/test_client.py
+++ b/test/test_client.py
@@ -9,7 +9,7 @@ import logging
import requests
import responses
import pkg_resources # part of setuptools
-import mock
+import unittest.mock as mock
import time
import json
from requests_oauthlib import OAuth1
--- a/test/test_listing.py
+++ b/test/test_listing.py
@@ -6,7 +6,7 @@ import pytest
import logging
import requests
import responses
-import mock
+import unittest.mock as mock
import json
import mwclient
from mwclient.listing import List, GeneratorList
--- a/test/test_page.py
+++ b/test/test_page.py
@@ -6,7 +6,7 @@ import pytest
import logging
import requests
import responses
-import mock
+import unittest.mock as mock
import json
import mwclient
from mwclient.page import Page
--- a/test/test_sleep.py
+++ b/test/test_sleep.py
@@ -2,7 +2,7 @@
from __future__ import print_function
import unittest
import time
-import mock
+import unittest.mock as mock
import pytest
from mwclient.sleep import Sleepers
from mwclient.sleep import Sleeper

3
mwclient-0.10.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:79363dd8d12f5e3b91b92b63152bf9dfef27da786c076a244e1f148c8dd67139
size 34923

6
python-mwclient.changes Normal file
View File

@@ -0,0 +1,6 @@
-------------------------------------------------------------------
Sat Jul 2 20:59:51 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Initial packaging effort for python-mwclient 0.10.1.
- Add demock.patch removing dependency on the external mock
module (gh#mwclient/mwclient#276).

71
python-mwclient.spec Normal file
View File

@@ -0,0 +1,71 @@
#
# spec file for package python-mwclient
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-mwclient
Version: 0.10.1
Release: 0
Summary: MediaWiki API client
License: MIT
URL: https://github.com/btongminh/mwclient
Source: https://files.pythonhosted.org/packages/source/m/mwclient/mwclient-%{version}.tar.gz
# PATCH-FIX-UPSTREAM demock.patch gh#mwclient/mwclient#276 mcepl@suse.com
# Remove dependency on mock
Patch0: demock.patch
BuildRequires: python-rpm-macros
BuildRequires: %{python_module setuptools}
# SECTION test requirements
BuildRequires: %{python_module requests-oauthlib}
BuildRequires: %{python_module six}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module responses}
BuildRequires: %{python_module responses >= 0.3.0}
# /SECTION
BuildRequires: fdupes
Requires: python-requests-oauthlib
Requires: python-six
BuildArch: noarch
%python_subpackages
%description
MediaWiki API client
%prep
%autosetup -p1 -n mwclient-%{version}
sed -i -e '/^addopts/d' setup.cfg
%build
%pyproject_wheel
%install
%pyproject_install --ignore-installed
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%doc README.md
%license LICENSE.md
%{python_sitelib}/mwclient-%{version}*-info
%{python_sitelib}/mwclient
%changelog