14
0

Accepting request 685184 from home:jayvdb:django

- Activate test suite and remove bcond test
- Add py37.patch already merged upstream to fix Python 3.7,
  especially git submodules
- Add test_blocking_lock_file-extra-time.patch to avoid an
  indeterministic timing failure
- Add test-skips.patch to skip one expected failure and workaround
  two unknown failures
- Remove test suite from the runtime package
- Add doc/source/*.rst to %docs
- Remove dependency on python3-mock
- Set build dependency ddt minimum version 1.1.1

OBS-URL: https://build.opensuse.org/request/show/685184
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-GitPython?expand=0&rev=20
This commit is contained in:
Tomáš Chvátal
2019-03-15 13:45:17 +00:00
committed by Git OBS Bridge
parent 014bdac590
commit ad4dad059d
7 changed files with 169 additions and 12 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-GitPython
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,9 +17,6 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Requires test files missing from the pypi source archive
# See: https://github.com/gitpython-developers/GitPython/pull/788
%bcond_with test
Name: python-GitPython
Version: 2.1.11
Release: 0
@@ -28,20 +25,23 @@ License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/gitpython-developers/GitPython
Source: https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-%{version}.tar.gz
Source1: test-data.tar.xz
Patch0: test-skips.patch
# Subset and rebase of merged https://github.com/gitpython-developers/GitPython/pull/793
Patch1: merged_pr_793.patch
Patch2: test_blocking_lock_file-extra-time.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: git-core
Requires: python-gitdb2 >= 2.0.0
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module ddt}
BuildRequires: %{python_module ddt >= 1.1.1}
BuildRequires: %{python_module gitdb2 >= 2.0.0}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module smmap2 >= 2.0.0}
BuildRequires: git
BuildRequires: python-mock
%endif
BuildRequires: python2-mock
%python_subpackages
%description
@@ -57,22 +57,39 @@ are 'cgit' and pure python, which is the default.
%prep
%setup -q -n GitPython-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
tar -xf %{SOURCE1}
cd test-data
echo y | ./init-tests-after-clone.sh
%build
%python_build
%install
%python_install
%python_expand rm -r %{buildroot}%{$python_sitelib}/git/test/
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_exec setup.py test
%endif
# While SKIP_GITHUB is fine, the two tests skipped with SKIP_LOCALHOST
# should work as the test runner sets up a git daemon.
export SKIP_GITHUB=true
export SKIP_LOCALHOST=true
export LANG=en_US.UTF-8
export GIT_PYTHON_TEST_GIT_REPO_BASE=${PWD}/test-data
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
%python_exec setup.py test --test-suite=git.test
%files %{python_files}
%license LICENSE
%doc AUTHORS CHANGES README.md
%doc AUTHORS CHANGES README.md doc/source/*.rst
%{python_sitelib}/*
%changelog