14
0
forked from pool/python-parted

Accepting request 1082661 from home:pgajdos:python

- do not require six
- added patches
  fix https://github.com/dcantrell/pyparted/issues/98
  + python-parted-no-six.patch

OBS-URL: https://build.opensuse.org/request/show/1082661
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-parted?expand=0&rev=17
This commit is contained in:
2023-04-27 21:55:21 +00:00
committed by Git OBS Bridge
parent cfc9a26831
commit 873c543bee
3 changed files with 57 additions and 2 deletions

View File

@@ -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 .*')

View File

@@ -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 <steven.kowalik@suse.com>

View File

@@ -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}