15
0

Accepting request 1036859 from home:jayvdb:branches:devel:languages:python

- Update to v1.0.1

OBS-URL: https://build.opensuse.org/request/show/1036859
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fake-useragent?expand=0&rev=6
This commit is contained in:
2022-11-20 18:42:14 +00:00
committed by Git OBS Bridge
parent 527d1b3b59
commit f41bbd4a7f
4 changed files with 37 additions and 12 deletions

View File

@@ -19,19 +19,23 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-fake-useragent
Version: 0.1.13
Version: 1.0.1
Release: 0
License: Apache-2.0
Summary: Useragent faker package for Python
URL: https://github.com/fake-useragent/fake-useragent
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/f/fake-useragent/fake-useragent-%{version}.tar.gz
Source: https://github.com/fake-useragent/fake-useragent/archive/refs/tags/%{version}.tar.gz#/fake-useragent-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module importlib-resources}
BuildRequires: %{python_module pytest}
# /SECTION
Requires: python-importlib-resources
BuildArch: noarch
%python_subpackages
@@ -41,20 +45,17 @@ Useragent faker with real world database.
%prep
%setup -q -n fake-useragent-%{version}
# https://github.com/fake-useragent/fake-useragent/issues/140
sed -i 's/import mock/import unittest.mock as mock/' tests/*.py
rm pytest.ini
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# Many tests depend on network
# https://github.com/fake-useragent/fake-useragent/issues/139
%pytest -k 'not (test_fake_user_agent or update or cache_server or test_utils_get or test_utils_load or test_fake_default_path or test_fake_safe_attrs)'
%pytest
%files %{python_files}
%license LICENSE