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.0.tar.gz
/pygit2-0.22.1.tar.gz /pygit2-0.22.1.tar.gz
/pygit2-0.23.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> From: Mathieu Bridon <bochecha@daitauha.fr>
Date: Wed, 21 Jan 2015 09:33:46 +0100 Date: Wed, 21 Jan 2015 09:33:46 +0100
Subject: [PATCH] Remove remote-calling unit tests 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 These can only fail when building in Koji, as the builder can't access
the Internet. the Internet.
--- ---
test/test_credentials.py | 17 ----------------- test/test_credentials.py | 21 ---------------------
test/test_repository.py | 8 -------- test/test_repository.py | 7 -------
2 files changed, 25 deletions(-) 2 files changed, 28 deletions(-)
diff --git a/test/test_credentials.py b/test/test_credentials.py 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 --- a/test/test_credentials.py
+++ b/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 test_bad_cred_type(self):
- def credentials_cb(url, username, allowed): - class MyCallbacks(pygit2.RemoteCallbacks):
- self.assertTrue(allowed & GIT_CREDTYPE_USERPASS_PLAINTEXT) - @staticmethod
- return Keypair("git", "foo.pub", "foo", "sekkrit") - 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") - url = "https://github.com/github/github"
- remote.credentials = credentials_cb - remote = self.repo.create_remote("github", url)
- - self.assertRaises(TypeError, lambda: remote.fetch(callbacks=MyCallbacks()))
- self.assertRaises(TypeError, remote.fetch)
- -
-class CallableCredentialTest(utils.RepoTestCase): -class CallableCredentialTest(utils.RepoTestCase):
- -
- def test_user_pass(self): - def test_user_pass(self):
- remote = self.repo.create_remote("bb", "https://bitbucket.org/libgit2/testgitrepository.git") - credentials = UserPass("libgit2", "libgit2")
- remote.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__': if __name__ == '__main__':
unittest.main() unittest.main()
diff --git a/test/test_repository.py b/test/test_repository.py 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 --- a/test/test_repository.py
+++ b/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.assertTrue('refs/remotes/custom_remote/master' in repo.listall_references())
self.assertIsNotNone(repo.remotes["custom_remote"]) self.assertIsNotNone(repo.remotes["custom_remote"])
- def test_clone_with_credentials(self): - def test_clone_with_credentials(self):
- credentials = pygit2.UserPass("libgit2", "libgit2")
- repo = clone_repository( - repo = clone_repository(
- "https://bitbucket.org/libgit2/testgitrepository.git", - "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) - self.assertFalse(repo.is_empty)
- -
@ -58,5 +60,5 @@ index 7640f39..decb974 100644
# create a test case which isolates the remote # create a test case which isolates the remote
test_repo = clone_repository('./test/data/testrepo.git', 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 %global pkgname pygit2
Name: python-%{pkgname} Name: python-%{pkgname}
Version: 0.23.1 Version: 0.23.3
Release: 3%{?dist} Release: 1%{?dist}
Summary: Python 2.x bindings for libgit2 Summary: Python bindings for libgit2
URL: http://www.pygit2.org URL: http://www.pygit2.org
Source: http://pypi.python.org/packages/source/p/%{pkgname}/%{pkgname}-%{version}.tar.gz Source: http://pypi.python.org/packages/source/p/%{pkgname}/%{pkgname}-%{version}.tar.gz
License: GPLv2 with linking exception License: GPLv2 with linking exception
BuildRequires: libgit2-devel BuildRequires: libgit2-devel
BuildRequires: openssl-devel BuildRequires: openssl-devel
BuildRequires: python-cffi
BuildRequires: python2-devel
BuildRequires: python-nose
BuildRequires: python-setuptools
Requires: python-cffi Requires: python-cffi
@ -20,11 +16,25 @@ Patch1: 0001-Remove-remote-calling-unit-tests.patch
%description %description
pygit2 is a set of Python bindings to the libgit2 library, which implements 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} %package -n python3-%{pkgname}
Summary: Python 3.x bindings for libgit2 Summary: Python 3.x bindings for libgit2
%{?python_provide:%python_provide python3-%{pkgname}}
BuildRequires: python3-cffi BuildRequires: python3-cffi
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-nose BuildRequires: python3-nose
@ -34,54 +44,39 @@ Requires: python3-cffi
%description -n python3-%{pkgname} %description -n python3-%{pkgname}
pygit2 is a set of Python bindings to the libgit2 library, which implements 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 %package doc
Summary: Documentation for %{name} Summary: Documentation for %{name}
BuildArch: noarch BuildArch: noarch
BuildRequires: python-sphinx BuildRequires: python2-sphinx
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description doc %description doc
Documentation for %{name}. Documentation for %{name}.
%prep %prep
%setup -qn %{pkgname}-%{version} %autosetup -n %{pkgname}-%{version} -p1
%patch1 -p1
rm -rf %{py3dir}
cp -a . %{py3dir}
%build %build
CFLAGS="%{optflags}" %{__python2} setup.py build %py2_build
make -C docs html make -C docs html
%py3_build
pushd %{py3dir}
CFLAGS="%{optflags}" %{__python3} setup.py build
popd
%install %install
%{__python2} setup.py install --prefix=%{_prefix} -O1 --skip-build --root=%{buildroot} %py2_install
pushd %{py3dir} %py3_install
%{__python3} setup.py install --prefix=%{_prefix} -O1 --skip-build --root=%{buildroot}
popd
find %{_builddir} -name '.buildinfo' -delete find %{_builddir} -name '.buildinfo' -delete
# Correct the permissions. # Correct the permissions.
find %{buildroot} -name '*.so' -exec chmod 755 {} ';' find %{buildroot} -name '*.so' -exec chmod 755 {} ';'
%check %check
%{__python2} setup.py test %{__python2} setup.py test
pushd %{py3dir}
%{__python3} setup.py test %{__python3} setup.py test
popd
%files -n python2-%{pkgname}
%files
%doc README.rst TODO.txt %doc README.rst TODO.txt
%license COPYING %license COPYING
%{python2_sitearch}/%{pkgname}-%{version}-py%{python2_version}.egg-info %{python2_sitearch}/%{pkgname}-%{version}-py%{python2_version}.egg-info
@ -98,8 +93,11 @@ popd
%files doc %files doc
%doc docs/_build/html/* %doc docs/_build/html/*
%changelog %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 * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - 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