1
0
forked from pool/python-pygit2

Accepting request 926495 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/926495
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pygit2?expand=0&rev=25
This commit is contained in:
Dominique Leuenberger 2021-10-23 21:14:04 +00:00 committed by Git OBS Bridge
commit 0d78a55ee4
5 changed files with 46 additions and 44 deletions

View File

@ -1,35 +0,0 @@
From b57aa0e889fe07d7b4663d0729a40f4a9ecf5578 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= <jdavid.ibp@gmail.com>
Date: Wed, 14 Oct 2020 08:36:08 +0200
Subject: [PATCH] Upgrade to libgit2 1.1
Fixes #1040
---
diff --git a/src/pygit2.c b/src/pygit2.c
index 4e144705..0693a790 100644
--- a/src/pygit2.c
+++ b/src/pygit2.c
@@ -590,6 +590,7 @@ PyInit__pygit2(void)
ADD_CONSTANT_INT(m, GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES)
ADD_CONSTANT_INT(m, GIT_BLAME_FIRST_PARENT)
ADD_CONSTANT_INT(m, GIT_BLAME_USE_MAILMAP)
+ ADD_CONSTANT_INT(m, GIT_BLAME_IGNORE_WHITESPACE)
/* Merge */
ADD_CONSTANT_INT(m, GIT_MERGE_ANALYSIS_NONE)
diff --git a/src/types.h b/src/types.h
index 0f3c8cf9..8ea01d38 100644
--- a/src/types.h
+++ b/src/types.h
@@ -32,8 +32,8 @@
#include <Python.h>
#include <git2.h>
-#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 0)
-#error You need a compatible libgit2 version (1.0.x)
+#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 1)
+#error You need a compatible libgit2 version (1.1.x)
#endif
/*

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0be93f6a8d7cbf0cc79ae2f0afb1993fc055fc0018c27e2bd01ba143e51d4452
size 243399

3
pygit2-1.7.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:602bffa8b4dbc185a6c7f36515563b600e0ee9002583c97ae3150eedaf340edb
size 276292

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Wed Oct 20 08:25:16 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Update to 1.7.0:
- Upgrade to libgit2 1.3.0
- Add support for Python 3.10
- Drop support for Python 3.6
- New `pygit2.GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES`
- New optional argument ``location`` in
``Repository.applies(..)`` and ``Repository.apply(..)``
- Fix: Now the `flags` argument in `Repository.blame()` is
passed through
- CI: Stop using Travis, move to GitHub actions
- Fix a number of reference leaks
- Review custom object backends
- In custom backends the callbacks have been renamed from ``read`` to
``read_cb``, ``write`` to ``write_cb``, and so on.
- New optional ``proxy`` argument in ``Remote`` methods
- New GIT_MERGE_PREFERENCE constants
- Don't require cached-property with Python 3.8 or later
- Refactored build and CI, new ``build.sh`` script
- Remove deprecated ``GIT_CREDTYPE_XXX`` contants, use
``GIT_CREDENTIAL_XXX`` instead.
- Remove deprecated ``Patch.patch`` getter, use ``Patch.text``
instead.
- New ``PackBuilder`` class and ``Repository.pack(...)``
- New ``Config.delete_multivar(...)``
- New ``Repository.is_shallow``
- New optional ``message`` argument in
``Repository.create_reference(...)``
- Fix truncated diff when there are nulls
- Fix ``Index.add(...)`` raise ``TypeError`` instead of
``AttributeError`` when arguments are of unexpected type
- Upgrade to libgit2 1.1, new ``GIT_BLAME_IGNORE_WHITESPACE`` constant
- Drop support for PyPy3 7.2
- New optional ``flags`` argument in ``Repository.__init__(...)``,
new ``GIT_REPOSITORY_OPEN_*`` constants
- Remove upstreamed libgit2_1.patch.
-------------------------------------------------------------------
Sun Nov 1 04:07:45 UTC 2020 - John Vandenberg <jayvdb@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-pygit2
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2019 Neal Gompa <ngompa13@gmail.com>.
#
# All modifications and additions to the file contributed by third parties
@ -20,14 +20,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-pygit2
Version: 1.3.0
Version: 1.7.0
Release: 0
Summary: Python bindings for libgit2
License: GPL-2.0-only
URL: https://github.com/libgit2/pygit2
Source: https://files.pythonhosted.org/packages/source/p/pygit2/pygit2-%{version}.tar.gz
# PATCH-FIX-UPSTREAM libgit2_1.patch gh#libgit2/pygit2#1040
Patch0: libgit2_1.patch
BuildRequires: %{python_module cached-property}
BuildRequires: %{python_module cffi >= 1.4.0}
BuildRequires: %{python_module devel}
@ -47,8 +45,8 @@ Requires: python-cached-property
Bindings for libgit2, a linkable C library for the Git version-control system.
%prep
%setup -q -n pygit2-%{version}
%patch0 -p1
%autosetup -p1 -n pygit2-%{version}
# do not add options to pytest
rm pytest.ini