From 7da448d55b6bd70bf78d18926b98090da04e3768ee057cc04a7d781418b24d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 26 Sep 2018 09:14:33 +0000 Subject: [PATCH] - Add patch to not depend on pep8 linter, also reported upstream to fix properly: * shortuuid-no-pep8.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-shortuuid?expand=0&rev=5 --- python-shortuuid.changes | 7 +++++++ python-shortuuid.spec | 14 ++++++-------- shortuuid-no-pep8.patch | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 shortuuid-no-pep8.patch diff --git a/python-shortuuid.changes b/python-shortuuid.changes index 97ce8d3..2ca60a8 100644 --- a/python-shortuuid.changes +++ b/python-shortuuid.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Sep 26 09:13:16 UTC 2018 - Tomáš Chvátal + +- Add patch to not depend on pep8 linter, also reported upstream + to fix properly: + * shortuuid-no-pep8.patch + ------------------------------------------------------------------- Sat Apr 28 13:50:31 UTC 2018 - toddrme2178@gmail.com diff --git a/python-shortuuid.spec b/python-shortuuid.spec index 7b6f6d6..0191f77 100644 --- a/python-shortuuid.spec +++ b/python-shortuuid.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -23,17 +23,14 @@ Release: 0 Summary: A generator library for concise, unambiguous and URL-safe UUIDs License: BSD-3-Clause Group: Development/Languages/Python -Url: https://github.com/stochastic-technologies/shortuuid/ +URL: https://github.com/stochastic-technologies/shortuuid/ Source: https://files.pythonhosted.org/packages/source/s/shortuuid/shortuuid-%{version}.tar.gz -BuildRequires: %{python_module devel} +# https://github.com/skorokithakis/shortuuid/issues/38 +Patch0: shortuuid-no-pep8.patch BuildRequires: %{python_module setuptools} -BuildRequires: python-rpm-macros -# SECTION test requirements -BuildRequires: %{python_module pep8} -# /SECTION BuildRequires: fdupes +BuildRequires: python-rpm-macros BuildArch: noarch - %python_subpackages %description @@ -43,6 +40,7 @@ similar-looking letters and numbers. %prep %setup -q -n shortuuid-%{version} +%patch0 -p1 %build %python_build diff --git a/shortuuid-no-pep8.patch b/shortuuid-no-pep8.patch new file mode 100644 index 0000000..c9252fd --- /dev/null +++ b/shortuuid-no-pep8.patch @@ -0,0 +1,39 @@ +Index: shortuuid-0.5.0/setup.py +=================================================================== +--- shortuuid-0.5.0.orig/setup.py ++++ shortuuid-0.5.0/setup.py +@@ -32,5 +32,4 @@ setup( + classifiers=classifiers, + packages=["shortuuid"], + test_suite='shortuuid.tests', +- tests_require=['pep8'], + ) +Index: shortuuid-0.5.0/shortuuid/tests.py +=================================================================== +--- shortuuid-0.5.0.orig/shortuuid/tests.py ++++ shortuuid-0.5.0/shortuuid/tests.py +@@ -2,7 +2,6 @@ import os + import string + import sys + import unittest +-import pep8 + from collections import defaultdict + + from uuid import UUID, uuid4 +@@ -125,16 +124,6 @@ class ClassShortUUIDTest(unittest.TestCa + su4 = ShortUUID() + self.assertEqual(su4.encoded_length(num_bytes=8), 11) + +- def test_pep8(self): +- pep8style = pep8.StyleGuide([['statistics', True], +- ['show-sources', True], +- ['repeat', True], +- ['paths', [os.path.dirname( +- os.path.abspath(__file__))]]], +- parse_argv=False) +- report = pep8style.check_files() +- assert report.total_errors == 0 +- + + class ShortUUIDPaddingTest(unittest.TestCase): + def test_padding(self):