* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygit2/files/, dev-python/pygit2/
@ 2018-01-02 6:19 Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2018-01-02 6:19 UTC (permalink / raw
To: gentoo-commits
commit: 32a0ce27892764f36c2285d34bd6bd82cfff3bed
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 1 22:05:28 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 2 06:18:47 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32a0ce27
dev-python/pygit2: Clean old up
dev-python/pygit2/Manifest | 1 -
.../files/pygit2-0.26.1-internet-tests.patch | 133 ---------------------
dev-python/pygit2/pygit2-0.26.1.ebuild | 30 -----
3 files changed, 164 deletions(-)
diff --git a/dev-python/pygit2/Manifest b/dev-python/pygit2/Manifest
index 0cb597f3afc..d612c14e31f 100644
--- a/dev-python/pygit2/Manifest
+++ b/dev-python/pygit2/Manifest
@@ -1,3 +1,2 @@
DIST pygit2-0.25.1.tar.gz 456580 BLAKE2B b7a9ce90076f2475df41f2e5ee8cbf7cb2ca68553076ae05cb2e8bdd68067f7373e33dfb03cadf90b7f410b5d5989b902b545fddbb1e3a9f17eb17d50692e982 SHA512 19908c874d5c2469609a54893f37367480d27ff03583c38b474ebb125dc9db95dc60776a120bb05662938d6eb62d4bcef24f684688e97e3453ccc27e015736cd
-DIST pygit2-0.26.1.tar.gz 458526 BLAKE2B 703093a5a292e92c90987785065f3a1590addc09d72311f75b22caf6fe1a17be8fb16cf777189835204cb7dc4d2066e841d3d4327e2cc040c312e22a4c75a8ee SHA512 23585bc0f41458442889b5434347cbc11d6c729898864262426f84e5b9239164bb58c6e910d2381b25f1b8be271674c1a6960630a504c40accdd30e487d27a7d
DIST pygit2-0.26.3.tar.gz 462080 BLAKE2B b3c4b9b8a6aeba22a70a8d2ef1393dace3a065a3625ee3574058e333bca4ba1d60223939f412eecf5ae9d93a81fb81c4a536af46aa047c2c82a48bd81afe4cf9 SHA512 6f727686221d4e8c348f836b7ad278b48a4b971a121b9953c2cf7163bf093936d838aaf83e9edb8628757624ab27e8345a2fb29eb1a79a30e06c0ab0a77e4cc6
diff --git a/dev-python/pygit2/files/pygit2-0.26.1-internet-tests.patch b/dev-python/pygit2/files/pygit2-0.26.1-internet-tests.patch
deleted file mode 100644
index 6b96eb40f3b..00000000000
--- a/dev-python/pygit2/files/pygit2-0.26.1-internet-tests.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From 24a929d003f1b6b4899f41cb227293e8c4b62eb7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Tue, 21 Nov 2017 17:53:48 +0100
-Subject: [PATCH] Disable tests requiring network access
-
----
- test/test_credentials.py | 3 +++
- test/test_repository.py | 1 +
- test/test_submodule.py | 4 ++++
- 3 files changed, 8 insertions(+)
-
-diff --git a/test/test_credentials.py b/test/test_credentials.py
-index 7921a41..e60383a 100644
---- a/test/test_credentials.py
-+++ b/test/test_credentials.py
-@@ -70,39 +70,42 @@ class CredentialCreateTest(utils.NoRepoTestCase):
- username = "git"
-
- cred = KeypairFromAgent(username)
- self.assertEqual((username, None, None, None), cred.credential_tuple)
-
-
- class CredentialCallback(utils.RepoTestCase):
-+ @unittest.skip('requires Internet access')
- def test_callback(self):
- class MyCallbacks(pygit2.RemoteCallbacks):
- @staticmethod
- def credentials(url, username, allowed):
- self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT)
- raise Exception("I don't know the password")
-
- url = "https://github.com/github/github"
- remote = self.repo.create_remote("github", url)
-
- self.assertRaises(Exception, lambda: remote.fetch(callbacks=MyCallbacks()))
-
-+ @unittest.skip('requires Internet access')
- def test_bad_cred_type(self):
- class MyCallbacks(pygit2.RemoteCallbacks):
- @staticmethod
- def credentials(url, username, allowed):
- self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT)
- return Keypair("git", "foo.pub", "foo", "sekkrit")
-
- url = "https://github.com/github/github"
- remote = self.repo.create_remote("github", url)
- self.assertRaises(TypeError, lambda: remote.fetch(callbacks=MyCallbacks()))
-
- class CallableCredentialTest(utils.RepoTestCase):
-
-+ @unittest.skip('requires Internet access')
- def test_user_pass(self):
- credentials = UserPass("libgit2", "libgit2")
- callbacks = pygit2.RemoteCallbacks(credentials=credentials)
-
- url = "https://bitbucket.org/libgit2/testgitrepository.git"
- remote = self.repo.create_remote("bb", url)
- remote.fetch(callbacks=callbacks)
-diff --git a/test/test_repository.py b/test/test_repository.py
-index 941851b..33f0571 100644
---- a/test/test_repository.py
-+++ b/test/test_repository.py
-@@ -569,14 +569,15 @@ class CloneRepositoryTest(utils.NoRepoTestCase):
- return repo.remotes.create("custom_remote", url)
-
- repo = clone_repository(url, repo_path, repository=create_repository, remote=create_remote)
- self.assertFalse(repo.is_empty)
- self.assertTrue('refs/remotes/custom_remote/master' in repo.listall_references())
- self.assertIsNotNone(repo.remotes["custom_remote"])
-
-+ @unittest.skip('requires Internet access')
- def test_clone_with_credentials(self):
- repo = clone_repository(
- "https://bitbucket.org/libgit2/testgitrepository.git",
- self._temp_dir, callbacks=pygit2.RemoteCallbacks(credentials=pygit2.UserPass("libgit2", "libgit2")))
-
- self.assertFalse(repo.is_empty)
-
-diff --git a/test/test_submodule.py b/test/test_submodule.py
-index f123b8b..df44e16 100644
---- a/test/test_submodule.py
-+++ b/test/test_submodule.py
-@@ -49,14 +49,15 @@ class SubmoduleTest(utils.SubmoduleRepoTestCase):
- self.assertIsNotNone(s)
-
- def test_listall_submodules(self):
- submodules = self.repo.listall_submodules()
- self.assertEqual(len(submodules), 1)
- self.assertEqual(submodules[0], SUBM_PATH)
-
-+ @unittest.skip('requires Internet access')
- def test_submodule_open(self):
- s = self.repo.lookup_submodule(SUBM_PATH)
- self.repo.init_submodules()
- self.repo.update_submodules()
- r = s.open()
- self.assertIsNotNone(r)
- self.assertEqual(str(r.head.target), SUBM_HEAD_SHA)
-@@ -69,28 +70,31 @@ class SubmoduleTest(utils.SubmoduleRepoTestCase):
- s = self.repo.lookup_submodule(SUBM_PATH)
- self.assertEqual(SUBM_PATH, s.path)
-
- def test_url(self):
- s = self.repo.lookup_submodule(SUBM_PATH)
- self.assertEqual(SUBM_URL, s.url)
-
-+ @unittest.skip('requires Internet access')
- def test_init_and_update(self):
- subrepo_file_path = os.path.join(self.repo_path, 'submodule', 'setup.py')
- self.assertFalse(os.path.exists(subrepo_file_path))
- self.repo.init_submodules()
- self.repo.update_submodules()
- self.assertTrue(os.path.exists(subrepo_file_path))
-
-+ @unittest.skip('requires Internet access')
- def test_specified_update(self):
- subrepo_file_path = os.path.join(self.repo_path, 'submodule', 'setup.py')
- self.assertFalse(os.path.exists(subrepo_file_path))
- self.repo.init_submodules(submodules=['submodule'])
- self.repo.update_submodules(submodules=['submodule'])
- self.assertTrue(os.path.exists(subrepo_file_path))
-
-+ @unittest.skip('requires Internet access')
- def test_oneshot_update(self):
- subrepo_file_path = os.path.join(self.repo_path, 'submodule', 'setup.py')
- self.assertFalse(os.path.exists(subrepo_file_path))
- self.repo.update_submodules(init=True)
- self.assertTrue(os.path.exists(subrepo_file_path))
-
- if __name__ == '__main__':
---
-2.15.0
-
diff --git a/dev-python/pygit2/pygit2-0.26.1.ebuild b/dev-python/pygit2/pygit2-0.26.1.ebuild
deleted file mode 100644
index d121e89b721..00000000000
--- a/dev-python/pygit2/pygit2-0.26.1.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit distutils-r1 eapi7-ver
-
-DESCRIPTION="Python bindings for libgit2"
-HOMEPAGE="https://github.com/libgit2/pygit2 https://pypi.python.org/pypi/pygit2"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2-with-linking-exception"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="
- =dev-libs/libgit2-$(ver_cut 1-2)*
- >=dev-python/cffi-1.0:=[${PYTHON_USEDEP}]
- dev-python/six[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/pygit2-0.26.1-internet-tests.patch
-)
-
-python_test() {
- esetup.py test --args='-v'
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygit2/files/, dev-python/pygit2/
@ 2021-12-21 9:42 Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2021-12-21 9:42 UTC (permalink / raw
To: gentoo-commits
commit: b9ecc3e323e2f214c1a0a62d2ab2f548dcfd6e76
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 21 07:10:27 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Dec 21 09:42:45 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9ecc3e3
dev-python/pygit2: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pygit2/Manifest | 2 -
.../pygit2/files/pygit2-1.6.1-libgit2-1.2.0.patch | 48 ----------------------
dev-python/pygit2/pygit2-1.6.1-r3.ebuild | 40 ------------------
dev-python/pygit2/pygit2-1.6.1-r4.ebuild | 44 --------------------
dev-python/pygit2/pygit2-1.7.0-r1.ebuild | 40 ------------------
5 files changed, 174 deletions(-)
diff --git a/dev-python/pygit2/Manifest b/dev-python/pygit2/Manifest
index eecec9ef872f..746e9bae01ab 100644
--- a/dev-python/pygit2/Manifest
+++ b/dev-python/pygit2/Manifest
@@ -1,3 +1 @@
-DIST pygit2-1.6.1.tar.gz 258338 BLAKE2B dc223e2a5231728c42ca7e0581483731fbab6ee090cf4aeeb27f186973b3c753fdf54c89679a88b97d834d717135f9b8f9a2adf492ed8572affa938c79d0f905 SHA512 67a78313493ba096cbae6805bda861495f33644fd180b5fb1cd99dcd226ef5a09ee85bd27d04d0697ef15503a4e902aa1384980870551f430fd9560ac949fe2f
-DIST pygit2-1.7.0.tar.gz 276292 BLAKE2B 6091e2916c4986cb545f23d3a31f262666f0349661ccc48769414e888d0ede48af3a80483b4638a3a2275b74ed9b42113bdeae678f03d76caa7e796c6011b50c SHA512 3a8654036d0ab875898ce60e81bcab48bdb6d6bd63c29dc98272c71b5c82391e3186da61083fba09faf722e176fed5c592a36edb53ae0b957726e74646d25616
DIST pygit2-1.7.1.tar.gz 281791 BLAKE2B 51f7f23752acf0abf6000f2262019db7503506267f0f5306bd53e0e15378447d2da564818c1b6efccc4759587aba6b4d7b142c760e4e2796445cd6056e949825 SHA512 a6232039b6364c7a0905aba20f7e27b43892b7067fa95fdd464438869453360ecdb885f2012cdf0eb0734c91dc79b60db894d1d0fee81922b9fb3cf920950937
diff --git a/dev-python/pygit2/files/pygit2-1.6.1-libgit2-1.2.0.patch b/dev-python/pygit2/files/pygit2-1.6.1-libgit2-1.2.0.patch
deleted file mode 100644
index d3e097ba62b3..000000000000
--- a/dev-python/pygit2/files/pygit2-1.6.1-libgit2-1.2.0.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From dcde9eff5950492ab0d2565a07fd18d765332a96 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= <jdavid.ibp@gmail.com>
-Date: Thu, 16 Sep 2021 11:19:04 +0200
-Subject: [PATCH] Upgrade to libgit2 1.2
-
-Closes #1089
----
- Makefile | 2 +-
- build.sh | 14 +++++++-------
- pygit2/decl/remote.h | 2 ++
- src/types.h | 4 ++--
- 10 files changed, 29 insertions(+), 25 deletions(-)
-
-diff --git a/pygit2/decl/remote.h b/pygit2/decl/remote.h
-index ff84371c3e1ce81a7e9914d4d4592638f41376bb..4e912c065cd6eaf19ef6d0304b0fd8f646edbff4 100644
---- a/pygit2/decl/remote.h
-+++ b/pygit2/decl/remote.h
-@@ -23,6 +23,7 @@ typedef struct {
-
- typedef int (*git_push_negotiation)(const git_push_update **updates, size_t len, void *payload);
- typedef int (*git_push_update_reference_cb)(const char *refname, const char *status, void *data);
-+typedef int (*git_remote_ready_cb)(git_remote *remote, int direction, void *payload);
- typedef int (*git_url_resolve_cb)(git_buf *url_resolved, const char *url, int direction, void *payload);
-
- struct git_remote_callbacks {
-@@ -38,6 +39,7 @@ struct git_remote_callbacks {
- git_push_update_reference_cb push_update_reference;
- git_push_negotiation push_negotiation;
- git_transport_cb transport;
-+ git_remote_ready_cb remote_ready;
- void *payload;
- git_url_resolve_cb resolve_url;
- };
-diff --git a/src/types.h b/src/types.h
-index ff967b81f76688f8f0958638d99a06f7bbacb99c..89ad3a00149a1326c3edfa20d2d69d629cb1d2a2 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 == 1)
--#error You need a compatible libgit2 version (1.1.x)
-+#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 2)
-+#error You need a compatible libgit2 version (1.2.x)
- #endif
-
- /*
diff --git a/dev-python/pygit2/pygit2-1.6.1-r3.ebuild b/dev-python/pygit2/pygit2-1.6.1-r3.ebuild
deleted file mode 100644
index 52934d483693..000000000000
--- a/dev-python/pygit2/pygit2-1.6.1-r3.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python bindings for libgit2"
-HOMEPAGE="https://github.com/libgit2/pygit2 https://pypi.org/project/pygit2/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2-with-linking-exception"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-RDEPEND="
- =dev-libs/libgit2-1.1*:=
- >=dev-python/cffi-1.0:=[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}"
-
-distutils_enable_tests pytest
-
-src_prepare() {
- distutils-r1_src_prepare
-
- # unconditionally prevent it from using network
- sed -i -e '/has_network/s:True:False:' test/utils.py || die
-
- # we need to move them away to prevent pytest from forcing '..'
- # for imports
- mkdir hack || die
- mv test hack/ || die
- ln -s hack/test test || die
-}
-
-python_test() {
- pytest -vv hack/test || die
-}
diff --git a/dev-python/pygit2/pygit2-1.6.1-r4.ebuild b/dev-python/pygit2/pygit2-1.6.1-r4.ebuild
deleted file mode 100644
index 29a58cb47655..000000000000
--- a/dev-python/pygit2/pygit2-1.6.1-r4.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
-
-DESCRIPTION="Python bindings for libgit2"
-HOMEPAGE="https://github.com/libgit2/pygit2 https://pypi.org/project/pygit2/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2-with-linking-exception"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="
- =dev-libs/libgit2-1.2*:=
- >=dev-python/cffi-1.0:=[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}"
-
-distutils_enable_tests pytest
-
-src_prepare() {
- local PATCHES=(
- "${FILESDIR}"/${P}-libgit2-1.2.0.patch
- )
-
- distutils-r1_src_prepare
-
- # unconditionally prevent it from using network
- sed -i -e '/has_network/s:True:False:' test/utils.py || die
-
- # we need to move them away to prevent pytest from forcing '..'
- # for imports
- mkdir hack || die
- mv test hack/ || die
- ln -s hack/test test || die
-}
-
-python_test() {
- epytest hack/test
-}
diff --git a/dev-python/pygit2/pygit2-1.7.0-r1.ebuild b/dev-python/pygit2/pygit2-1.7.0-r1.ebuild
deleted file mode 100644
index e1df5178654a..000000000000
--- a/dev-python/pygit2/pygit2-1.7.0-r1.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
-
-DESCRIPTION="Python bindings for libgit2"
-HOMEPAGE="https://github.com/libgit2/pygit2 https://pypi.org/project/pygit2/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2-with-linking-exception"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-RDEPEND="
- =dev-libs/libgit2-1.3*:=
- >=dev-python/cffi-1.0:=[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}"
-
-distutils_enable_tests pytest
-
-src_prepare() {
- distutils-r1_src_prepare
-
- # unconditionally prevent it from using network
- sed -i -e '/has_network/s:True:False:' test/utils.py || die
-
- # we need to move them away to prevent pytest from forcing '..'
- # for imports
- mkdir hack || die
- mv test hack/ || die
- ln -s hack/test test || die
-}
-
-python_test() {
- epytest hack/test
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygit2/files/, dev-python/pygit2/
@ 2018-01-05 23:19 Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2018-01-05 23:19 UTC (permalink / raw
To: gentoo-commits
commit: 5a112538b264c22884fbc5acff31595c782b66c9
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 5 22:10:59 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan 5 23:19:11 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a112538
dev-python/pygit2: Clean old up
dev-python/pygit2/Manifest | 1 -
.../pygit2/files/pygit2-0.25.1-cffi-1.10.patch | 55 ----------------------
dev-python/pygit2/pygit2-0.25.1.ebuild | 30 ------------
3 files changed, 86 deletions(-)
diff --git a/dev-python/pygit2/Manifest b/dev-python/pygit2/Manifest
index d612c14e31f..544d6a63916 100644
--- a/dev-python/pygit2/Manifest
+++ b/dev-python/pygit2/Manifest
@@ -1,2 +1 @@
-DIST pygit2-0.25.1.tar.gz 456580 BLAKE2B b7a9ce90076f2475df41f2e5ee8cbf7cb2ca68553076ae05cb2e8bdd68067f7373e33dfb03cadf90b7f410b5d5989b902b545fddbb1e3a9f17eb17d50692e982 SHA512 19908c874d5c2469609a54893f37367480d27ff03583c38b474ebb125dc9db95dc60776a120bb05662938d6eb62d4bcef24f684688e97e3453ccc27e015736cd
DIST pygit2-0.26.3.tar.gz 462080 BLAKE2B b3c4b9b8a6aeba22a70a8d2ef1393dace3a065a3625ee3574058e333bca4ba1d60223939f412eecf5ae9d93a81fb81c4a536af46aa047c2c82a48bd81afe4cf9 SHA512 6f727686221d4e8c348f836b7ad278b48a4b971a121b9953c2cf7163bf093936d838aaf83e9edb8628757624ab27e8345a2fb29eb1a79a30e06c0ab0a77e4cc6
diff --git a/dev-python/pygit2/files/pygit2-0.25.1-cffi-1.10.patch b/dev-python/pygit2/files/pygit2-0.25.1-cffi-1.10.patch
deleted file mode 100644
index c071f9e5dd6..00000000000
--- a/dev-python/pygit2/files/pygit2-0.25.1-cffi-1.10.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From b88dc868423af2f760f649960112efd0e37e5335 Mon Sep 17 00:00:00 2001
-From: Lukas Fleischer <lfleischer@lfos.de>
-Date: Sat, 6 May 2017 21:39:33 +0200
-Subject: [PATCH] Fix parameter passing of describe patterns
-
-When ffi.new() is used to build a new pointer object, the returned
-pointer object has ownership on the allocated memory. When it is
-garbage-collected, then the memory is freed. Thus, we need to make sure
-the original object survives its use, otherwise the casted pointer will
-point to garbage.
-
-This fixes one test which was failing with the latest CFFI version, see
-issue #694. Thus, this commit also reverts 803b1cb (cffi 1.10 not yet
-supported, 2017-03-22) where the latest CFFI version was marked as
-unsupported.
-
-Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
----
- .travis.yml | 2 +-
- pygit2/repository.py | 6 +++++-
- setup.py | 4 ++--
- 3 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/pygit2/repository.py b/pygit2/repository.py
-index 9377aa2..472f4ff 100644
---- a/pygit2/repository.py
-+++ b/pygit2/repository.py
-@@ -692,7 +692,11 @@ def describe(self, committish=None, max_candidates_tags=None,
- if describe_strategy is not None:
- options.describe_strategy = describe_strategy
- if pattern:
-- options.pattern = ffi.new('char[]', to_bytes(pattern))
-+ # The returned pointer object has ownership on the allocated
-+ # memory. Make sure it is kept alive until git_describe_commit() or
-+ # git_describe_workdir() are called below.
-+ pattern_char = ffi.new('char[]', to_bytes(pattern))
-+ options.pattern = pattern_char
- if only_follow_first_parent is not None:
- options.only_follow_first_parent = only_follow_first_parent
- if show_commit_oid_as_fallback is not None:
-diff --git a/setup.py b/setup.py
-index f4a9f8c..18d3eb0 100644
---- a/setup.py
-+++ b/setup.py
-@@ -203,8 +203,8 @@ def run(self):
- long_description=long_description,
- packages=['pygit2'],
- package_data={'pygit2': ['decl.h']},
-- setup_requires=['cffi<1.10'],
-- install_requires=['cffi<1.10', 'six'],
-+ setup_requires=['cffi'],
-+ install_requires=['cffi', 'six'],
- zip_safe=False,
- cmdclass=cmdclass,
- **extra_args)
diff --git a/dev-python/pygit2/pygit2-0.25.1.ebuild b/dev-python/pygit2/pygit2-0.25.1.ebuild
deleted file mode 100644
index 35a8f52ddc9..00000000000
--- a/dev-python/pygit2/pygit2-0.25.1.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-
-inherit distutils-r1 versionator
-
-DESCRIPTION="Python bindings for libgit2"
-HOMEPAGE="https://github.com/libgit2/pygit2 https://pypi.python.org/pypi/pygit2"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2-with-linking-exception"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="
- =dev-libs/libgit2-$(get_version_component_range 1-2)*
- >=dev-python/cffi-1.0:=[${PYTHON_USEDEP}]
- dev-python/six[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/pygit2-0.25.1-cffi-1.10.patch
-)
-
-python_test() {
- esetup.py test
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygit2/files/, dev-python/pygit2/
@ 2017-05-14 22:34 Mike Gilbert
0 siblings, 0 replies; 4+ messages in thread
From: Mike Gilbert @ 2017-05-14 22:34 UTC (permalink / raw
To: gentoo-commits
commit: e7878326f5127b3bb61c8ba69428f2ce2ffeec61
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun May 14 22:33:26 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun May 14 22:33:26 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7878326
dev-python/pygit2: backport cffi-1.10 fix
Bug: https://bugs.gentoo.org/618470
Package-Manager: Portage-2.3.5_p32, Repoman-2.3.2_p62
.../pygit2/files/pygit2-0.25.1-cffi-1.10.patch | 55 ++++++++++++++++++++++
dev-python/pygit2/pygit2-0.25.1.ebuild | 4 ++
2 files changed, 59 insertions(+)
diff --git a/dev-python/pygit2/files/pygit2-0.25.1-cffi-1.10.patch b/dev-python/pygit2/files/pygit2-0.25.1-cffi-1.10.patch
new file mode 100644
index 00000000000..c071f9e5dd6
--- /dev/null
+++ b/dev-python/pygit2/files/pygit2-0.25.1-cffi-1.10.patch
@@ -0,0 +1,55 @@
+From b88dc868423af2f760f649960112efd0e37e5335 Mon Sep 17 00:00:00 2001
+From: Lukas Fleischer <lfleischer@lfos.de>
+Date: Sat, 6 May 2017 21:39:33 +0200
+Subject: [PATCH] Fix parameter passing of describe patterns
+
+When ffi.new() is used to build a new pointer object, the returned
+pointer object has ownership on the allocated memory. When it is
+garbage-collected, then the memory is freed. Thus, we need to make sure
+the original object survives its use, otherwise the casted pointer will
+point to garbage.
+
+This fixes one test which was failing with the latest CFFI version, see
+issue #694. Thus, this commit also reverts 803b1cb (cffi 1.10 not yet
+supported, 2017-03-22) where the latest CFFI version was marked as
+unsupported.
+
+Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
+---
+ .travis.yml | 2 +-
+ pygit2/repository.py | 6 +++++-
+ setup.py | 4 ++--
+ 3 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/pygit2/repository.py b/pygit2/repository.py
+index 9377aa2..472f4ff 100644
+--- a/pygit2/repository.py
++++ b/pygit2/repository.py
+@@ -692,7 +692,11 @@ def describe(self, committish=None, max_candidates_tags=None,
+ if describe_strategy is not None:
+ options.describe_strategy = describe_strategy
+ if pattern:
+- options.pattern = ffi.new('char[]', to_bytes(pattern))
++ # The returned pointer object has ownership on the allocated
++ # memory. Make sure it is kept alive until git_describe_commit() or
++ # git_describe_workdir() are called below.
++ pattern_char = ffi.new('char[]', to_bytes(pattern))
++ options.pattern = pattern_char
+ if only_follow_first_parent is not None:
+ options.only_follow_first_parent = only_follow_first_parent
+ if show_commit_oid_as_fallback is not None:
+diff --git a/setup.py b/setup.py
+index f4a9f8c..18d3eb0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -203,8 +203,8 @@ def run(self):
+ long_description=long_description,
+ packages=['pygit2'],
+ package_data={'pygit2': ['decl.h']},
+- setup_requires=['cffi<1.10'],
+- install_requires=['cffi<1.10', 'six'],
++ setup_requires=['cffi'],
++ install_requires=['cffi', 'six'],
+ zip_safe=False,
+ cmdclass=cmdclass,
+ **extra_args)
diff --git a/dev-python/pygit2/pygit2-0.25.1.ebuild b/dev-python/pygit2/pygit2-0.25.1.ebuild
index a88aff4993c..35a8f52ddc9 100644
--- a/dev-python/pygit2/pygit2-0.25.1.ebuild
+++ b/dev-python/pygit2/pygit2-0.25.1.ebuild
@@ -21,6 +21,10 @@ RDEPEND="
"
DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}"/pygit2-0.25.1-cffi-1.10.patch
+)
+
python_test() {
esetup.py test
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-21 9:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-02 6:19 [gentoo-commits] repo/gentoo:master commit in: dev-python/pygit2/files/, dev-python/pygit2/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2021-12-21 9:42 Michał Górny
2018-01-05 23:19 Michał Górny
2017-05-14 22:34 Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox