diff --git a/python-parted-no-six.patch b/python-parted-no-six.patch new file mode 100644 index 0000000..df67ae0 --- /dev/null +++ b/python-parted-no-six.patch @@ -0,0 +1,46 @@ +Index: pyparted-3.12.0/.github/workflows/test.yml +=================================================================== +--- pyparted-3.12.0.orig/.github/workflows/test.yml ++++ pyparted-3.12.0/.github/workflows/test.yml +@@ -34,5 +34,4 @@ jobs: + python3-pytest \ + python3-types-six \ + udev +- pip install six + env PYTHON=python3 make test coverage COVERAGE=coverage +Index: pyparted-3.12.0/src/parted/disk.py +=================================================================== +--- pyparted-3.12.0.orig/src/parted/disk.py ++++ pyparted-3.12.0/src/parted/disk.py +@@ -56,12 +56,10 @@ class Disk(object): + self._partitions = CachedList(lambda : self.__getPartitions()) + + def _hasSameParts(self, other): +- import six +- + if len(self.partitions) != len(other.partitions): + return False + +- partIter = six.moves.zip(self.partitions, other.partitions) ++ partIter = zip(self.partitions, other.partitions) + while True: + try: + (left, right) = next(partIter) +Index: pyparted-3.12.0/tests/test__ped_geometry.py +=================================================================== +--- pyparted-3.12.0.orig/tests/test__ped_geometry.py ++++ pyparted-3.12.0/tests/test__ped_geometry.py +@@ -19,7 +19,6 @@ + # + + import _ped +-import six + from tests.baseclass import RequiresDevice + + # One class per method, multiple tests per class. For these simple methods, +@@ -375,4 +374,4 @@ class GeometryStrTestCase(RequiresDevice + lines = str(self.g).split('\n') + self.assertEqual(lines[0], '_ped.Geometry instance --') + self.assertEqual(lines[1], ' start: 10 end: 109 length: 100') +- six.assertRegex(self, lines[2], '^ device: <_ped.Device object at .*') ++ self.assertRegex(lines[2], '^ device: <_ped.Device object at .*') diff --git a/python-parted.changes b/python-parted.changes index fb4e3f1..02c9f7d 100644 --- a/python-parted.changes +++ b/python-parted.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 25 07:49:04 UTC 2023 - pgajdos@suse.com + +- do not require six +- added patches + fix https://github.com/dcantrell/pyparted/issues/98 + + python-parted-no-six.patch + ------------------------------------------------------------------- Thu Jul 21 13:12:51 UTC 2022 - Steve Kowalik diff --git a/python-parted.spec b/python-parted.spec index ff46266..549b040 100644 --- a/python-parted.spec +++ b/python-parted.spec @@ -1,7 +1,7 @@ # # spec file for package python-parted # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,6 @@ %define srcname pyparted -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-parted Version: 3.12.0 Release: 0 @@ -30,6 +29,8 @@ Patch0: pyparted-3.10.patch Patch3: python-parted-parted-binary.patch Patch4: python-parted-featurestest.patch Patch5: more-features-exposed.patch +# https://github.com/dcantrell/pyparted/pull/101 +Patch6: python-parted-no-six.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six}