- 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
This commit is contained in:
Matej Cepl 2020-03-31 15:04:59 +00:00 committed by Git OBS Bridge
parent de6f257e89
commit 2c9e6dfaf5
2 changed files with 28 additions and 7 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Mar 31 14:54:17 UTC 2020 - Matej Cepl <mcepl@suse.com>
- 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 <tchvatal@suse.com>

View File

@ -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