Update to 0.23.3; Fix compliance with new packaging guidelines

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
Igor Gnatenko 2016-02-14 14:28:39 +01:00
parent 8c404afbc3
commit 4e64165976
5 changed files with 58 additions and 1154 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@
/pygit2-0.22.0.tar.gz
/pygit2-0.22.1.tar.gz
/pygit2-0.23.1.tar.gz
/pygit2-0.23.3.tar.gz

View File

@ -1,4 +1,4 @@
From 7552a25ca68931143332e49edd072bd92e7f9904 Mon Sep 17 00:00:00 2001
From 509cb3b15b6f32a7e9dd1a5f96fbd2ba9b0d86d6 Mon Sep 17 00:00:00 2001
From: Mathieu Bridon <bochecha@daitauha.fr>
Date: Wed, 21 Jan 2015 09:33:46 +0100
Subject: [PATCH] Remove remote-calling unit tests
@ -6,51 +6,53 @@ Subject: [PATCH] Remove remote-calling unit tests
These can only fail when building in Koji, as the builder can't access
the Internet.
---
test/test_credentials.py | 17 -----------------
test/test_repository.py | 8 --------
2 files changed, 25 deletions(-)
test/test_credentials.py | 21 ---------------------
test/test_repository.py | 7 -------
2 files changed, 28 deletions(-)
diff --git a/test/test_credentials.py b/test/test_credentials.py
index 376032f..abcce52 100644
index 92482d9..36263c0 100644
--- a/test/test_credentials.py
+++ b/test/test_credentials.py
@@ -79,23 +79,6 @@ class CredentialCallback(utils.RepoTestCase):
@@ -81,26 +81,5 @@ class CredentialCallback(utils.RepoTestCase):
self.assertRaises(Exception, remote.fetch)
self.assertRaises(Exception, lambda: remote.fetch(callbacks=MyCallbacks()))
- def test_bad_cred_type(self):
- def credentials_cb(url, username, allowed):
- self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT)
- return Keypair("git", "foo.pub", "foo", "sekkrit")
- class MyCallbacks(pygit2.RemoteCallbacks):
- @staticmethod
- def credentials(url, username, allowed):
- self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT)
- return Keypair("git", "foo.pub", "foo", "sekkrit")
-
- remote = self.repo.create_remote("github", "https://github.com/github/github")
- remote.credentials = credentials_cb
-
- self.assertRaises(TypeError, remote.fetch)
- 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):
-
- def test_user_pass(self):
- remote = self.repo.create_remote("bb", "https://bitbucket.org/libgit2/testgitrepository.git")
- remote.credentials = UserPass("libgit2", "libgit2")
- 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)
-
- remote.fetch()
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_repository.py b/test/test_repository.py
index 7640f39..decb974 100644
index 8558340..e127cc4 100644
--- a/test/test_repository.py
+++ b/test/test_repository.py
@@ -457,14 +457,6 @@ class CloneRepositoryTest(utils.NoRepoTestCase):
@@ -513,13 +513,6 @@ class CloneRepositoryTest(utils.NoRepoTestCase):
self.assertTrue('refs/remotes/custom_remote/master' in repo.listall_references())
self.assertIsNotNone(repo.remotes["custom_remote"])
- def test_clone_with_credentials(self):
- credentials = pygit2.UserPass("libgit2", "libgit2")
- repo = clone_repository(
- "https://bitbucket.org/libgit2/testgitrepository.git",
- self._temp_dir, credentials=credentials)
- self._temp_dir, callbacks=pygit2.RemoteCallbacks(credentials=pygit2.UserPass("libgit2", "libgit2")))
-
- self.assertFalse(repo.is_empty)
-
@ -58,5 +60,5 @@ index 7640f39..decb974 100644
# create a test case which isolates the remote
test_repo = clone_repository('./test/data/testrepo.git',
--
2.1.0
2.7.1

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,14 @@
%global pkgname pygit2
Name: python-%{pkgname}
Version: 0.23.1
Release: 3%{?dist}
Summary: Python 2.x bindings for libgit2
Version: 0.23.3
Release: 1%{?dist}
Summary: Python bindings for libgit2
URL: http://www.pygit2.org
Source: http://pypi.python.org/packages/source/p/%{pkgname}/%{pkgname}-%{version}.tar.gz
License: GPLv2 with linking exception
BuildRequires: libgit2-devel
BuildRequires: openssl-devel
BuildRequires: python-cffi
BuildRequires: python2-devel
BuildRequires: python-nose
BuildRequires: python-setuptools
Requires: python-cffi
@ -20,11 +16,25 @@ Patch1: 0001-Remove-remote-calling-unit-tests.patch
%description
pygit2 is a set of Python bindings to the libgit2 library, which implements
the core of Git. Pygit2 works with Python 2.7, 3.1, 3.2, 3.3, 3.4 and pypy.
the core of Git.
%package -n python2-%{pkgname}
Summary: Python 2.x bindings for libgit2
%{?python_provide:%python_provide python2-%{pkgname}}
BuildRequires: python2-cffi
BuildRequires: python2-devel
BuildRequires: python2-nose
BuildRequires: python2-setuptools
%description -n python2-%{pkgname}
pygit2 is a set of Python bindings to the libgit2 library, which implements
the core of Git.
Python 2 version.
%package -n python3-%{pkgname}
Summary: Python 3.x bindings for libgit2
%{?python_provide:%python_provide python3-%{pkgname}}
BuildRequires: python3-cffi
BuildRequires: python3-devel
BuildRequires: python3-nose
@ -34,54 +44,39 @@ Requires: python3-cffi
%description -n python3-%{pkgname}
pygit2 is a set of Python bindings to the libgit2 library, which implements
the core of Git. Pygit2 works with Python 2.7, 3.1, 3.2, 3.3 and 3.4.
the core of Git.
Python 3 version.
%package doc
Summary: Documentation for %{name}
BuildArch: noarch
BuildRequires: python-sphinx
BuildRequires: python2-sphinx
Requires: %{name} = %{version}-%{release}
%description doc
Documentation for %{name}.
%prep
%setup -qn %{pkgname}-%{version}
%patch1 -p1
rm -rf %{py3dir}
cp -a . %{py3dir}
%autosetup -n %{pkgname}-%{version} -p1
%build
CFLAGS="%{optflags}" %{__python2} setup.py build
%py2_build
make -C docs html
pushd %{py3dir}
CFLAGS="%{optflags}" %{__python3} setup.py build
popd
%py3_build
%install
%{__python2} setup.py install --prefix=%{_prefix} -O1 --skip-build --root=%{buildroot}
pushd %{py3dir}
%{__python3} setup.py install --prefix=%{_prefix} -O1 --skip-build --root=%{buildroot}
popd
%py2_install
%py3_install
find %{_builddir} -name '.buildinfo' -delete
# Correct the permissions.
find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
%check
%{__python2} setup.py test
pushd %{py3dir}
%{__python3} setup.py test
popd
%files
%files -n python2-%{pkgname}
%doc README.rst TODO.txt
%license COPYING
%{python2_sitearch}/%{pkgname}-%{version}-py%{python2_version}.egg-info
@ -98,8 +93,11 @@ popd
%files doc
%doc docs/_build/html/*
%changelog
* Sun Feb 14 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.23.3-1
- Update to 0.23.3
- Fix compliance with new packaging guidelines
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View File

@ -1 +1 @@
d48aba904772dc3c2e4421f1d4ba7655 pygit2-0.23.1.tar.gz
1c20926ad48ce622b0087ab2bb812ae3 pygit2-0.23.3.tar.gz