File python-WeConnect-Cupra.spec of Package python-WeConnect-Cupra

#
# spec file for package python-wakeonlan
#
# Copyright (c) 2017 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
# 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 http://bugs.opensuse.org/


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define         skip_python2 1
Name:           python-WeConnect-Cupra
Version:        2.0.1
Release:        0
License:        MIT
Summary:        Volkswagen API
Group:          Development/Languages/Python
Url:            https://github.com/daernsinstantfortress/WeConnect-python
Source:         WeConnect-Cupra-python-%{version}.tar.xz
BuildRequires:  %{python_module wheel}
BuildRequires:  %{python_module poetry-core}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module requests}
BuildRequires:  %{python_module oauthlib}
BuildRequires:  %{python_module pytest-runner}
BuildRequires:  %{python_module ascii_magic}
Requires: python-ascii_magic
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires: python-requests >= 2.28.0
Requires: python-oauthlib
# == 3.2.0
Requires: python-Pillow
# 9.2.0

Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch:      noarch
%python_subpackages

%description
Python library to access the volkswagen API, supporting all their brands like
Seat, Cupra

%prep
%setup -q -n WeConnect-Cupra-python-%{version}
# we do not care about source style in the package
sed -i /^bandit/d setup_requirements.txt
sed -i /^pylint/d setup_requirements.txt
sed -i /^flake/d setup_requirements.txt
sed -i /^mccabe/d setup_requirements.txt
sed -i /^pytest/d setup_requirements.txt

# fix version
#sed -i -e s,develop,%version, weconnect/__version.py

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_expand rm -rf %{buildroot}%{$python_sitelib}/tests

%files %{python_files}
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by