python-GitPython/python-GitPython.spec

96 lines
3.2 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package python-GitPython
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define skip_python2 1
%define simple_ver 3.1.34
%{?sle15_python_module_pythons}
Name: python-GitPython
Version: 3.1.34.1693646983.2a2ae77
Release: 0
Summary: Python Git Library
License: BSD-3-Clause
URL: https://github.com/gitpython-developers/GitPython
- Update to version 3.1.0.1582544583.8c9da73: * Replace invalid bytes when decoding TagObject stream * Use UTF-8 encoding when getting information about a symbolic reference * Remove and replace references to nose with unittest in documentation * Remove nose from test requirements * Replace nose with unittest in tox configuration * Replace nose with unittest in Travis CI script * Added changelog for unreleased changes * Restrict gitdb2 version to <4 * Remove test.lib.asserts and use unittest.mock.patch directly * Replace assert_false with assertFalse * Replace assert_true with assertTrue * Replace raises with assertRaises * Replace assert_raises with assertRaises * Replace assert_not_equal with assertNotEqual * Replace assert_equal with assertEqual * Remove and replace assert_match with assertRegex * Remove old, no longer used assert methods * Remove references to old mock library in documentation * Remove outdated checks for unittest.mock existence * Fix Python version requirement in documentation * Remove badges for no longer existing Waffle site from README * Add support for Python 3.8 * Replace deprecated Logger.warn with Logger.warning * Replace deprecated assertRaisesRegexp alias with assertRaisesRegex * Replace deprecated assertNotEquals alias with assertNotEqual * Replace deprecated assertEquals alias with assertEqual in TestGit * Replace deprecated assertRegexpMatches alias with assertRegex * Replace deprecated failUnlessRaises alias with assertRaises in tests * Improve requirements.txt format OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-GitPython?expand=0&rev=30
2020-04-02 11:46:33 +02:00
Source: GitPython-%{version}.tar.xz
Patch0: test-skips.patch
Patch1: test_blocking_lock_file-extra-time.patch
# PATCH-FIX-UPSTREAM CVE-2023-41040.patch gh#gitpython-developers/GitPython#1644
Patch2: CVE-2023-41040.patch
BuildRequires: %{python_module ddt >= 1.1.1}
- Update to version 3.1.0.1582544583.8c9da73: * Replace invalid bytes when decoding TagObject stream * Use UTF-8 encoding when getting information about a symbolic reference * Remove and replace references to nose with unittest in documentation * Remove nose from test requirements * Replace nose with unittest in tox configuration * Replace nose with unittest in Travis CI script * Added changelog for unreleased changes * Restrict gitdb2 version to <4 * Remove test.lib.asserts and use unittest.mock.patch directly * Replace assert_false with assertFalse * Replace assert_true with assertTrue * Replace raises with assertRaises * Replace assert_raises with assertRaises * Replace assert_not_equal with assertNotEqual * Replace assert_equal with assertEqual * Remove and replace assert_match with assertRegex * Remove old, no longer used assert methods * Remove references to old mock library in documentation * Remove outdated checks for unittest.mock existence * Fix Python version requirement in documentation * Remove badges for no longer existing Waffle site from README * Add support for Python 3.8 * Replace deprecated Logger.warn with Logger.warning * Replace deprecated assertRaisesRegexp alias with assertRaisesRegex * Replace deprecated assertNotEquals alias with assertNotEqual * Replace deprecated assertEquals alias with assertEqual in TestGit * Replace deprecated assertRegexpMatches alias with assertRegex * Replace deprecated failUnlessRaises alias with assertRaises in tests * Improve requirements.txt format OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-GitPython?expand=0&rev=30
2020-04-02 11:46:33 +02:00
BuildRequires: %{python_module gitdb >= 4.0.1}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
- Update to version 3.1.0.1582544583.8c9da73: * Replace invalid bytes when decoding TagObject stream * Use UTF-8 encoding when getting information about a symbolic reference * Remove and replace references to nose with unittest in documentation * Remove nose from test requirements * Replace nose with unittest in tox configuration * Replace nose with unittest in Travis CI script * Added changelog for unreleased changes * Restrict gitdb2 version to <4 * Remove test.lib.asserts and use unittest.mock.patch directly * Replace assert_false with assertFalse * Replace assert_true with assertTrue * Replace raises with assertRaises * Replace assert_raises with assertRaises * Replace assert_not_equal with assertNotEqual * Replace assert_equal with assertEqual * Remove and replace assert_match with assertRegex * Remove old, no longer used assert methods * Remove references to old mock library in documentation * Remove outdated checks for unittest.mock existence * Fix Python version requirement in documentation * Remove badges for no longer existing Waffle site from README * Add support for Python 3.8 * Replace deprecated Logger.warn with Logger.warning * Replace deprecated assertRaisesRegexp alias with assertRaisesRegex * Replace deprecated assertNotEquals alias with assertNotEqual * Replace deprecated assertEquals alias with assertEqual in TestGit * Replace deprecated assertRegexpMatches alias with assertRegex * Replace deprecated failUnlessRaises alias with assertRaises in tests * Improve requirements.txt format OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-GitPython?expand=0&rev=30
2020-04-02 11:46:33 +02:00
BuildRequires: %{python_module smmap >= 3.0.1}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
- Update to version 3.1.0.1582544583.8c9da73: * Replace invalid bytes when decoding TagObject stream * Use UTF-8 encoding when getting information about a symbolic reference * Remove and replace references to nose with unittest in documentation * Remove nose from test requirements * Replace nose with unittest in tox configuration * Replace nose with unittest in Travis CI script * Added changelog for unreleased changes * Restrict gitdb2 version to <4 * Remove test.lib.asserts and use unittest.mock.patch directly * Replace assert_false with assertFalse * Replace assert_true with assertTrue * Replace raises with assertRaises * Replace assert_raises with assertRaises * Replace assert_not_equal with assertNotEqual * Replace assert_equal with assertEqual * Remove and replace assert_match with assertRegex * Remove old, no longer used assert methods * Remove references to old mock library in documentation * Remove outdated checks for unittest.mock existence * Fix Python version requirement in documentation * Remove badges for no longer existing Waffle site from README * Add support for Python 3.8 * Replace deprecated Logger.warn with Logger.warning * Replace deprecated assertRaisesRegexp alias with assertRaisesRegex * Replace deprecated assertNotEquals alias with assertNotEqual * Replace deprecated assertEquals alias with assertEqual in TestGit * Replace deprecated assertRegexpMatches alias with assertRegex * Replace deprecated failUnlessRaises alias with assertRaises in tests * Improve requirements.txt format OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-GitPython?expand=0&rev=30
2020-04-02 11:46:33 +02:00
BuildRequires: git-core
BuildRequires: python-rpm-macros
Requires: git-core
- Update to version 3.1.0.1582544583.8c9da73: * Replace invalid bytes when decoding TagObject stream * Use UTF-8 encoding when getting information about a symbolic reference * Remove and replace references to nose with unittest in documentation * Remove nose from test requirements * Replace nose with unittest in tox configuration * Replace nose with unittest in Travis CI script * Added changelog for unreleased changes * Restrict gitdb2 version to <4 * Remove test.lib.asserts and use unittest.mock.patch directly * Replace assert_false with assertFalse * Replace assert_true with assertTrue * Replace raises with assertRaises * Replace assert_raises with assertRaises * Replace assert_not_equal with assertNotEqual * Replace assert_equal with assertEqual * Remove and replace assert_match with assertRegex * Remove old, no longer used assert methods * Remove references to old mock library in documentation * Remove outdated checks for unittest.mock existence * Fix Python version requirement in documentation * Remove badges for no longer existing Waffle site from README * Add support for Python 3.8 * Replace deprecated Logger.warn with Logger.warning * Replace deprecated assertRaisesRegexp alias with assertRaisesRegex * Replace deprecated assertNotEquals alias with assertNotEqual * Replace deprecated assertEquals alias with assertEqual in TestGit * Replace deprecated assertRegexpMatches alias with assertRegex * Replace deprecated failUnlessRaises alias with assertRaises in tests * Improve requirements.txt format OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-GitPython?expand=0&rev=30
2020-04-02 11:46:33 +02:00
Requires: python-gitdb >= 4.0.1
BuildArch: noarch
%python_subpackages
%description
GitPython is a python library used to interact with Git repositories.
GitPython provides object model read and write access to your git repository.
Access repository information conveniently, alter the index directly, handle
remotes, or go down to low-level object database access with big-files support.
With the new object database abstraction added in 0.3, its even possible to
implement your own storage mechanisms, the currently available implementations
are 'cgit' and pure python, which is the default.
%prep
%autosetup -p1 -n GitPython-%{version}
# do not pull in extra deps
sed -i -e '/tox/d' -e '/flake8/d' -e '/coverage/d' test-requirements.txt
sed -i -e '/addopts/d' pyproject.toml
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# 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 TRAVIS=true
export LANG=en_US.UTF-8
export GIT_PYTHON_TEST_GIT_REPO_BASE=${PWD}
git config --global protocol.file.allow "always"
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
# And it completely unraveled again gh#gitpython-developers/GitPython#914
%pytest -k 'not (test_installation or test_rev_parse)' || /bin/true
%files %{python_files}
%license LICENSE
%doc AUTHORS CHANGES README.md doc/source/*.rst
%{python_sitelib}/git
%{python_sitelib}/GitPython-%{simple_ver}.dist-info
%changelog