From 72f7c94c6df6c78dd2ea5317953103e5efdf6e36342fab5b157019b9703be7f4 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Wed, 16 Aug 2017 05:28:47 +0000 Subject: [PATCH] Accepting request 517081 from home:sebix:branches:devel:languages:python - convert to singlespec - update to 1.35 OBS-URL: https://build.opensuse.org/request/show/517081 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyGithub?expand=0&rev=12 --- PyGithub-1.25.2.tar.gz | 3 -- PyGithub-1.35.tar.gz | 3 ++ PyGithub-drop-network-tests.patch | 41 ++---------------------- python-PyGithub.changes | 6 ++++ python-PyGithub.spec | 52 ++++++++++++++++++------------- 5 files changed, 42 insertions(+), 63 deletions(-) delete mode 100644 PyGithub-1.25.2.tar.gz create mode 100644 PyGithub-1.35.tar.gz diff --git a/PyGithub-1.25.2.tar.gz b/PyGithub-1.25.2.tar.gz deleted file mode 100644 index 98a5652..0000000 --- a/PyGithub-1.25.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72aee507625e8ce6e3bef825e2ba543d0a2a20cb5ba5edfbe6436fc6eadfcef8 -size 2577534 diff --git a/PyGithub-1.35.tar.gz b/PyGithub-1.35.tar.gz new file mode 100644 index 0000000..4ded529 --- /dev/null +++ b/PyGithub-1.35.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fea1c5adedb0b2c641422efa7d22ad1af1b538a499faf25da14c0bb57e2cfefe +size 2625163 diff --git a/PyGithub-drop-network-tests.patch b/PyGithub-drop-network-tests.patch index 57ab98b..ac2d219 100644 --- a/PyGithub-drop-network-tests.patch +++ b/PyGithub-drop-network-tests.patch @@ -1,6 +1,6 @@ ---- a/github/tests/AllTests.py -+++ b/github/tests/AllTests.py -@@ -84,7 +84,6 @@ from Issue133 import * +--- github/tests/AllTests.py 2017-07-10 13:18:40.000000000 +0200 ++++ github/tests/AllTests.py 2017-08-15 21:19:28.243948366 +0200 +@@ -90,7 +90,6 @@ from Issue134 import * from Issue139 import * from Issue140 import * @@ -8,38 +8,3 @@ from Issue158 import * from Issue174 import * from Issue214 import * ---- a/github/tests/Issue142.py -+++ /dev/null -@@ -1,32 +0,0 @@ --# -*- coding: utf-8 -*- -- --# ########################## Copyrights and license ############################ --# # --# Copyright 2013 Vincent Jacques # --# # --# This file is part of PyGithub. http://jacquev6.github.com/PyGithub/ # --# # --# PyGithub is free software: you can redistribute it and/or modify it under # --# the terms of the GNU Lesser General Public License as published by the Free # --# Software Foundation, either version 3 of the License, or (at your option) # --# any later version. # --# # --# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY # --# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # --# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # --# details. # --# # --# You should have received a copy of the GNU Lesser General Public License # --# along with PyGithub. If not, see . # --# # --# ############################################################################## -- --import unittest --import github -- -- --class Issue142(unittest.TestCase): # https://github.com/jacquev6/PyGithub/issues/142 -- def testDecodeJson(self): -- # This test has to hit GitHub for real, because the record-replay framework looses types -- # and python3 does not behave like python2 for strings and bytes -- self.assertEqual(github.Github().get_rate_limit().rate.limit, 60) diff --git a/python-PyGithub.changes b/python-PyGithub.changes index b311a73..9401c7c 100644 --- a/python-PyGithub.changes +++ b/python-PyGithub.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Aug 15 18:52:21 UTC 2017 - sebix+novell.com@sebix.at + +- convert to singlespec +- update to 1.35 + ------------------------------------------------------------------- Mon May 11 15:48:45 UTC 2015 - benoit.monin@gmx.fr diff --git a/python-PyGithub.spec b/python-PyGithub.spec index b57d971..acca609 100644 --- a/python-PyGithub.spec +++ b/python-PyGithub.spec @@ -1,7 +1,7 @@ # # spec file for package python-PyGithub # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,24 +16,32 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{!?license: %global license %doc} +%bcond_without test Name: python-PyGithub -Version: 1.25.2 +Version: 1.35 Release: 0 Summary: Use the full Github API v3 -License: LGPL-3.0+ +License: LGPL-3.0 Group: Development/Languages/Python -Url: http://jacquev6.github.com/PyGithub -Source: http://pypi.python.org/packages/source/P/PyGithub/PyGithub-%{version}.tar.gz -# PATCH-FIX-OPENSUSE speilicke@suse.com -- Remove tests that need network access during build +Url: http://pygithub.github.io/PyGithub/v1/index.html +Source: https://files.pythonhosted.org/packages/source/P/PyGithub/PyGithub-%{version}.tar.gz +# PATCH-FIX-OPENSUSE sebix+novell.com@sebix.at -- Remove test that needs network access Patch0: PyGithub-drop-network-tests.patch -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# SECTION test +BuildRequires: %{python_module PyJWT} +# /SECTION +Requires: python-PyJWT +Recommends: python-cryptography BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else BuildArch: noarch -%endif + +%python_subpackages %description PyGithub is a Python (2 and 3) library to use the Github API v3. With it, you @@ -42,22 +50,22 @@ etc.) from Python scripts. %prep %setup -q -n PyGithub-%{version} -%patch0 -p1 +%patch0 %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} -rm -r %{buildroot}%{python_sitelib}/github/tests # Don't ship testsuite +%python_install +%{python_expand rm -r %{buildroot}%{$python_sitelib}/github/tests/} +%{python_expand %fdupes %{buildroot}%{$python_sitelib}} %check -python setup.py -q test +%{python_exec setup.py test} -%files -%defattr(-,root,root,-) -%doc README.rst COPYING COPYING.LESSER -%{python_sitelib}/github -%{python_sitelib}/PyGithub-%{version}-py%{py_ver}.egg-info +%files %{python_files} +%license COPYING COPYING.LESSER +%doc README.md +%{python_sitelib}/* %changelog