File oauth2-clientd.spec of Package oauth2-clientd
# # spec file for package oauth2-clientd
#
# Copyright (c) 2021 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/
#
%define needs_explicit_requires %(test -e /usr/lib/rpm/fileattrs/pythondist.attr || echo 1)
Name: oauth2-clientd
Version: 0.7
Release: 0
Summary: OAUTH2 client caching daemon
License: GPL-2.0
URL: https://github.com/jeffmahoney/oauth2-clientd
Group: Productivity/Networking/Security
Source: %{name}-%{version}.tar.xz
BuildRequires: python3-setuptools
BuildRequires: python-rpm-generators
%if 0%{?needs_explicit_requires}
Requires: python3-atomicwrites
Requires: python3-cryptography
Requires: python3-python-daemon
Requires: python3-requests-oauthlib
Requires: (python >= 3.7 or python3-importlib_resources)
%endif
%{?python_enable_dependency_generator}
BuildArch: noarch
%description
oauth2-clientd is a daemon that obtains, refreshes, and secures OAUTH2
credentials for use by other software.
%prep
%setup -q
sed -i -e 's/version=.*/version="%{version}",/' setup.py
%build
python3 setup.py build
%install
python3 setup.py install --root %{buildroot}
%files
%license LICENSE
%doc README.md
%dir %{python3_sitelib}/oauth2_clientd
%dir %{python3_sitelib}/oauth2_clientd/__pycache__
%dir %{python3_sitelib}/oauth2_clientd-%{version}-py3.*.egg-info
%dir %{python3_sitelib}/oauth2_clientd/data
%dir %{python3_sitelib}/oauth2_clientd/data/__pycache__
%{_bindir}/oauth2-clientd
%{python3_sitelib}/oauth2_clientd/__init__.py
%{python3_sitelib}/oauth2_clientd/__pycache__/*
%{python3_sitelib}/oauth2_clientd/cli.py
%{python3_sitelib}/oauth2_clientd/encryption.py
%{python3_sitelib}/oauth2_clientd/helpers.py
%{python3_sitelib}/oauth2_clientd/sessionmanager.py
%{python3_sitelib}/oauth2_clientd/data/__init__.py
%{python3_sitelib}/oauth2_clientd/data/__pycache__/*
%{python3_sitelib}/oauth2_clientd/data/builtin-providers.conf
%{python3_sitelib}/oauth2_clientd-%{version}-py3.*.egg-info/PKG-INFO
%{python3_sitelib}/oauth2_clientd-%{version}-py3.*.egg-info/*.txt
%changelog