Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pygit2/files/, dev-python/pygit2/
Date: Tue, 02 Jan 2018 06:19:17
Message-Id: 1514873927.32a0ce27892764f36c2285d34bd6bd82cfff3bed.mgorny@gentoo
1 commit: 32a0ce27892764f36c2285d34bd6bd82cfff3bed
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 1 22:05:28 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 2 06:18:47 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32a0ce27
7
8 dev-python/pygit2: Clean old up
9
10 dev-python/pygit2/Manifest | 1 -
11 .../files/pygit2-0.26.1-internet-tests.patch | 133 ---------------------
12 dev-python/pygit2/pygit2-0.26.1.ebuild | 30 -----
13 3 files changed, 164 deletions(-)
14
15 diff --git a/dev-python/pygit2/Manifest b/dev-python/pygit2/Manifest
16 index 0cb597f3afc..d612c14e31f 100644
17 --- a/dev-python/pygit2/Manifest
18 +++ b/dev-python/pygit2/Manifest
19 @@ -1,3 +1,2 @@
20 DIST pygit2-0.25.1.tar.gz 456580 BLAKE2B b7a9ce90076f2475df41f2e5ee8cbf7cb2ca68553076ae05cb2e8bdd68067f7373e33dfb03cadf90b7f410b5d5989b902b545fddbb1e3a9f17eb17d50692e982 SHA512 19908c874d5c2469609a54893f37367480d27ff03583c38b474ebb125dc9db95dc60776a120bb05662938d6eb62d4bcef24f684688e97e3453ccc27e015736cd
21 -DIST pygit2-0.26.1.tar.gz 458526 BLAKE2B 703093a5a292e92c90987785065f3a1590addc09d72311f75b22caf6fe1a17be8fb16cf777189835204cb7dc4d2066e841d3d4327e2cc040c312e22a4c75a8ee SHA512 23585bc0f41458442889b5434347cbc11d6c729898864262426f84e5b9239164bb58c6e910d2381b25f1b8be271674c1a6960630a504c40accdd30e487d27a7d
22 DIST pygit2-0.26.3.tar.gz 462080 BLAKE2B b3c4b9b8a6aeba22a70a8d2ef1393dace3a065a3625ee3574058e333bca4ba1d60223939f412eecf5ae9d93a81fb81c4a536af46aa047c2c82a48bd81afe4cf9 SHA512 6f727686221d4e8c348f836b7ad278b48a4b971a121b9953c2cf7163bf093936d838aaf83e9edb8628757624ab27e8345a2fb29eb1a79a30e06c0ab0a77e4cc6
23
24 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
25 deleted file mode 100644
26 index 6b96eb40f3b..00000000000
27 --- a/dev-python/pygit2/files/pygit2-0.26.1-internet-tests.patch
28 +++ /dev/null
29 @@ -1,133 +0,0 @@
30 -From 24a929d003f1b6b4899f41cb227293e8c4b62eb7 Mon Sep 17 00:00:00 2001
31 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
32 -Date: Tue, 21 Nov 2017 17:53:48 +0100
33 -Subject: [PATCH] Disable tests requiring network access
34 -
35 ----
36 - test/test_credentials.py | 3 +++
37 - test/test_repository.py | 1 +
38 - test/test_submodule.py | 4 ++++
39 - 3 files changed, 8 insertions(+)
40 -
41 -diff --git a/test/test_credentials.py b/test/test_credentials.py
42 -index 7921a41..e60383a 100644
43 ---- a/test/test_credentials.py
44 -+++ b/test/test_credentials.py
45 -@@ -70,39 +70,42 @@ class CredentialCreateTest(utils.NoRepoTestCase):
46 - username = "git"
47 -
48 - cred = KeypairFromAgent(username)
49 - self.assertEqual((username, None, None, None), cred.credential_tuple)
50 -
51 -
52 - class CredentialCallback(utils.RepoTestCase):
53 -+ @unittest.skip('requires Internet access')
54 - def test_callback(self):
55 - class MyCallbacks(pygit2.RemoteCallbacks):
56 - @staticmethod
57 - def credentials(url, username, allowed):
58 - self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT)
59 - raise Exception("I don't know the password")
60 -
61 - url = "https://github.com/github/github"
62 - remote = self.repo.create_remote("github", url)
63 -
64 - self.assertRaises(Exception, lambda: remote.fetch(callbacks=MyCallbacks()))
65 -
66 -+ @unittest.skip('requires Internet access')
67 - def test_bad_cred_type(self):
68 - class MyCallbacks(pygit2.RemoteCallbacks):
69 - @staticmethod
70 - def credentials(url, username, allowed):
71 - self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT)
72 - return Keypair("git", "foo.pub", "foo", "sekkrit")
73 -
74 - url = "https://github.com/github/github"
75 - remote = self.repo.create_remote("github", url)
76 - self.assertRaises(TypeError, lambda: remote.fetch(callbacks=MyCallbacks()))
77 -
78 - class CallableCredentialTest(utils.RepoTestCase):
79 -
80 -+ @unittest.skip('requires Internet access')
81 - def test_user_pass(self):
82 - credentials = UserPass("libgit2", "libgit2")
83 - callbacks = pygit2.RemoteCallbacks(credentials=credentials)
84 -
85 - url = "https://bitbucket.org/libgit2/testgitrepository.git"
86 - remote = self.repo.create_remote("bb", url)
87 - remote.fetch(callbacks=callbacks)
88 -diff --git a/test/test_repository.py b/test/test_repository.py
89 -index 941851b..33f0571 100644
90 ---- a/test/test_repository.py
91 -+++ b/test/test_repository.py
92 -@@ -569,14 +569,15 @@ class CloneRepositoryTest(utils.NoRepoTestCase):
93 - return repo.remotes.create("custom_remote", url)
94 -
95 - repo = clone_repository(url, repo_path, repository=create_repository, remote=create_remote)
96 - self.assertFalse(repo.is_empty)
97 - self.assertTrue('refs/remotes/custom_remote/master' in repo.listall_references())
98 - self.assertIsNotNone(repo.remotes["custom_remote"])
99 -
100 -+ @unittest.skip('requires Internet access')
101 - def test_clone_with_credentials(self):
102 - repo = clone_repository(
103 - "https://bitbucket.org/libgit2/testgitrepository.git",
104 - self._temp_dir, callbacks=pygit2.RemoteCallbacks(credentials=pygit2.UserPass("libgit2", "libgit2")))
105 -
106 - self.assertFalse(repo.is_empty)
107 -
108 -diff --git a/test/test_submodule.py b/test/test_submodule.py
109 -index f123b8b..df44e16 100644
110 ---- a/test/test_submodule.py
111 -+++ b/test/test_submodule.py
112 -@@ -49,14 +49,15 @@ class SubmoduleTest(utils.SubmoduleRepoTestCase):
113 - self.assertIsNotNone(s)
114 -
115 - def test_listall_submodules(self):
116 - submodules = self.repo.listall_submodules()
117 - self.assertEqual(len(submodules), 1)
118 - self.assertEqual(submodules[0], SUBM_PATH)
119 -
120 -+ @unittest.skip('requires Internet access')
121 - def test_submodule_open(self):
122 - s = self.repo.lookup_submodule(SUBM_PATH)
123 - self.repo.init_submodules()
124 - self.repo.update_submodules()
125 - r = s.open()
126 - self.assertIsNotNone(r)
127 - self.assertEqual(str(r.head.target), SUBM_HEAD_SHA)
128 -@@ -69,28 +70,31 @@ class SubmoduleTest(utils.SubmoduleRepoTestCase):
129 - s = self.repo.lookup_submodule(SUBM_PATH)
130 - self.assertEqual(SUBM_PATH, s.path)
131 -
132 - def test_url(self):
133 - s = self.repo.lookup_submodule(SUBM_PATH)
134 - self.assertEqual(SUBM_URL, s.url)
135 -
136 -+ @unittest.skip('requires Internet access')
137 - def test_init_and_update(self):
138 - subrepo_file_path = os.path.join(self.repo_path, 'submodule', 'setup.py')
139 - self.assertFalse(os.path.exists(subrepo_file_path))
140 - self.repo.init_submodules()
141 - self.repo.update_submodules()
142 - self.assertTrue(os.path.exists(subrepo_file_path))
143 -
144 -+ @unittest.skip('requires Internet access')
145 - def test_specified_update(self):
146 - subrepo_file_path = os.path.join(self.repo_path, 'submodule', 'setup.py')
147 - self.assertFalse(os.path.exists(subrepo_file_path))
148 - self.repo.init_submodules(submodules=['submodule'])
149 - self.repo.update_submodules(submodules=['submodule'])
150 - self.assertTrue(os.path.exists(subrepo_file_path))
151 -
152 -+ @unittest.skip('requires Internet access')
153 - def test_oneshot_update(self):
154 - subrepo_file_path = os.path.join(self.repo_path, 'submodule', 'setup.py')
155 - self.assertFalse(os.path.exists(subrepo_file_path))
156 - self.repo.update_submodules(init=True)
157 - self.assertTrue(os.path.exists(subrepo_file_path))
158 -
159 - if __name__ == '__main__':
160 ---
161 -2.15.0
162 -
163
164 diff --git a/dev-python/pygit2/pygit2-0.26.1.ebuild b/dev-python/pygit2/pygit2-0.26.1.ebuild
165 deleted file mode 100644
166 index d121e89b721..00000000000
167 --- a/dev-python/pygit2/pygit2-0.26.1.ebuild
168 +++ /dev/null
169 @@ -1,30 +0,0 @@
170 -# Copyright 1999-2017 Gentoo Foundation
171 -# Distributed under the terms of the GNU General Public License v2
172 -
173 -EAPI=6
174 -PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
175 -
176 -inherit distutils-r1 eapi7-ver
177 -
178 -DESCRIPTION="Python bindings for libgit2"
179 -HOMEPAGE="https://github.com/libgit2/pygit2 https://pypi.python.org/pypi/pygit2"
180 -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
181 -
182 -LICENSE="GPL-2-with-linking-exception"
183 -SLOT="0"
184 -KEYWORDS="~amd64 ~x86"
185 -
186 -RDEPEND="
187 - =dev-libs/libgit2-$(ver_cut 1-2)*
188 - >=dev-python/cffi-1.0:=[${PYTHON_USEDEP}]
189 - dev-python/six[${PYTHON_USEDEP}]
190 -"
191 -DEPEND="${RDEPEND}"
192 -
193 -PATCHES=(
194 - "${FILESDIR}"/pygit2-0.26.1-internet-tests.patch
195 -)
196 -
197 -python_test() {
198 - esetup.py test --args='-v'
199 -}