File matrix-python-common.spec of Package matrix-python-common

#
# spec file for package matrix-python-common
#
# 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/
#


%{?sle15_python_module_pythons}
Name:           matrix-python-common
Version:        1.3.0
Release:        0
Summary:        Common code for Synapse, Sydent and Signal
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://github.com/matrix-org/matrix-python-common/
Source0:        https://github.com/matrix-org/matrix-python-common/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:  %{python_module devel >= 3.7}
#
BuildRequires:  %{python_module mypy}
BuildRequires:  %{python_module black}
#BuildRequires:  %%{python_module flak8}
BuildRequires:  %{python_module isort}
BuildRequires:  %{python_module build}
BuildRequires:  %{python_module twine}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module wheel}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
# /SECTION TEST requirement
BuildRequires: %{python_module tox}
BuildRequires: %{python_module Twisted}
#BuildRequires: %%{python_module aiounittest}
# /SECTION
Requires:       python-attrs
Provides:       matrix-python-common
#BuildArch:      noarch
%python_subpackages

%description
Common utilities for Synapse, Sydent and Sygnal.

%prep
%setup -q -n matrix-python-common-%{version}

%build
# Remove export CFLAGS=... for noarch packages (unneeded)
export CFLAGS="%{optflags}"
export PYTHONPATH=$PWD
%pyproject_wheel

%install
%pyproject_install
%python_expand %fdupes %{buildroot}/%{$python_sitelib}

%check
#%%python_expand $python setup.py test

%files %{python_files}
%license LICENSE
%doc README.md
# For noarch packages: sitelib
%{python_sitelib}/*
# For arch-specific packages: sitearch
#%%{python_sitearch}/*

%changelog
openSUSE Build Service is sponsored by