From 4f80fcbd4b643d4bd092bcdd248a3e255c82b4967ffe207b3c5b3b258e4c0b03 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 31 Mar 2020 15:04:59 +0000 Subject: [PATCH] - Skip over failing UpdateTestCase.test_update_with_invalid_state test (gh#getpatchwork/git-pw#53) - Add Provides/Obsoletes to rename git-pw to python-git-pw package. - Replace %python_only construct with proper alternatives. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-git-pw?expand=0&rev=4 --- python-git-pw.changes | 8 ++++++++ python-git-pw.spec | 27 ++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/python-git-pw.changes b/python-git-pw.changes index 368ea67..2cec491 100644 --- a/python-git-pw.changes +++ b/python-git-pw.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Mar 31 14:54:17 UTC 2020 - Matej Cepl + +- Skip over failing UpdateTestCase.test_update_with_invalid_state test + (gh#getpatchwork/git-pw#53) +- Add Provides/Obsoletes to rename git-pw to python-git-pw package. +- Replace %python_only construct with proper alternatives. + ------------------------------------------------------------------- Sun Mar 15 07:24:31 UTC 2020 - Tomáš Chvátal diff --git a/python-git-pw.spec b/python-git-pw.spec index 5cc6ec9..0b6372a 100644 --- a/python-git-pw.spec +++ b/python-git-pw.spec @@ -1,5 +1,5 @@ # -# spec file for package python +# spec file for package python-git-pw # # Copyright (c) 2020 SUSE LLC # @@ -17,13 +17,14 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: git-pw +%define modname git-pw +Name: python-git-pw Version: 1.8.0 Release: 0 Summary: A tool for integrating Git with Patchwork License: MIT -URL: https://github.com/getpatchwork/%{name} -Source: https://files.pythonhosted.org/packages/source/g/%{name}/%{name}-%{version}.tar.gz +URL: https://github.com/getpatchwork/git-pw +Source: https://files.pythonhosted.org/packages/source/g/%{modname}/%{modname}-%{version}.tar.gz BuildRequires: %{python_module arrow >= 0.10} BuildRequires: %{python_module click >= 6.0} BuildRequires: %{python_module mock} @@ -42,6 +43,10 @@ Requires: python-click >= 6.0 Requires: python-requests > 2.0 Requires: python-six >= 1.12 Requires: python-tabulate >= 0.8 +Provides: %{modname} = %{version} +Obsoletes: %{modname} < %{version} +Requires(post): update-alternatives +Requires(postun): update-alternatives %python_subpackages %description @@ -49,23 +54,31 @@ git-pw is a tool for integrating Git with Patchwork, the web-based patch tracking system. %prep -%setup -q +%setup -q -n %{modname}-%{version} %build %python_build %install %python_install +%python_clone -a %{buildroot}%{_bindir}/git-pw %python_expand %fdupes %{buildroot}%{$python_sitelib} %check export LC_ALL=en_US.UTF-8 -%pytest +# gh#getpatchwork/git-pw#53 +%pytest -k 'not test_update_with_invalid_state' + +%post +%python_install_alternative git-pw + +%postun +%python_uninstall_alternative git-pw %files %{python_files} %license LICENSE %doc README.rst -%python3_only %{_bindir}/git-pw +%python_alternative %{_bindir}/git-pw %{python_sitelib}/git_pw %{python_sitelib}/git_pw-%{version}-py%{python_version}.egg-info