copr-matrix-common/python-matrix-common.spec

62 lines
1.4 KiB
RPMSpec
Raw Normal View History

2022-01-26 23:19:51 +00:00
%global srcname matrix-common
%global releasename matrix-python-common
%global pymodulename matrix_common
Name: python-%{srcname}
Version: 1.0.0
Release: 1%{?dist}
Summary: Common utilities for Synapse, Sydent and Sygnal
License: ASL 2.0
URL: https://github.com/matrix-org/%{releasename}
Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
# https://github.com/matrix-org/matrix-python-common/pull/19
Patch0: 0001-Add-test-extra.patch
BuildArch: noarch
BuildRequires: python3-devel
%global _description %{expand:
Common utilities for Synapse, Sydent and Sygnal.}
%description %_description
%package -n python3-%{srcname}
Summary: %{summary}
%description -n python3-%{srcname} %_description
%prep
%autosetup -p1 -n %{releasename}-%{version}
%generate_buildrequires
%pyproject_buildrequires -e py
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files %{pymodulename}
%check
# Make sure only installed modules are tested by removing all local ones.
# https://github.com/matrix-org/matrix-python-common/issues/16
find . -maxdepth 2 -name '__init__.py' -exec dirname {} \; | grep -v ^\./tests | xargs rm -rf
%tox
%files -n python3-%{srcname} -f %{pyproject_files}
%doc README.md
%license LICENSE
%changelog
* Sat Jan 08 2022 Kai A. Hiller <V02460@gmail.com> - 1.0.0-1
- Initial package
- Fixes rhbz#2038993