Initial import (fedora#2038993)
This commit is contained in:
parent
9552a57ae9
commit
8f9fee05c6
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/matrix-common-1.0.0.tar.gz
|
45
0001-Add-test-extra.patch
Normal file
45
0001-Add-test-extra.patch
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
From a24740f61299cfc628715212def51318bde00c7b Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Kai A. Hiller" <V02460@gmail.com>
|
||||||
|
Date: Wed, 26 Jan 2022 21:55:09 +0100
|
||||||
|
Subject: [PATCH 1/2] Add test extra
|
||||||
|
|
||||||
|
---
|
||||||
|
setup.cfg | 5 +++--
|
||||||
|
tox.ini | 2 +-
|
||||||
|
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/setup.cfg b/setup.cfg
|
||||||
|
index d54b7a4..75f55d6 100644
|
||||||
|
--- a/setup.cfg
|
||||||
|
+++ b/setup.cfg
|
||||||
|
@@ -23,11 +23,12 @@ matrix_common = py.typed
|
||||||
|
|
||||||
|
|
||||||
|
[options.extras_require]
|
||||||
|
-dev =
|
||||||
|
- # for tests
|
||||||
|
+test =
|
||||||
|
tox
|
||||||
|
twisted
|
||||||
|
aiounittest
|
||||||
|
+dev =
|
||||||
|
+ %(test)s
|
||||||
|
# for type checking
|
||||||
|
mypy == 0.910
|
||||||
|
# for linting
|
||||||
|
diff --git a/tox.ini b/tox.ini
|
||||||
|
index 291e9b2..952b7ea 100644
|
||||||
|
--- a/tox.ini
|
||||||
|
+++ b/tox.ini
|
||||||
|
@@ -15,7 +15,7 @@ isolated_build = true
|
||||||
|
# creates a symlink to the project directory instead of unpacking the sdist.
|
||||||
|
usedevelop=true
|
||||||
|
|
||||||
|
-extras = dev
|
||||||
|
+extras = test
|
||||||
|
|
||||||
|
commands =
|
||||||
|
python -m twisted.trial tests
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
61
python-matrix-common.spec
Normal file
61
python-matrix-common.spec
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
%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
|
Loading…
Reference in a new issue