dcantrel pushed to pyparted (f21). "Add Python 3 subpackage (#1196402)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Fri Apr 24 20:16:17 UTC 2015
>From ee2ec6a6569737a9820b2481ae0dcb886db11376 Mon Sep 17 00:00:00 2001
From: David Cantrell <dcantrell at redhat.com>
Date: Fri, 24 Apr 2015 16:16:03 -0400
Subject: Add Python 3 subpackage (#1196402)
diff --git a/pyparted-3.9.5-rhbz1196402.patch b/pyparted-3.9.5-rhbz1196402.patch
index 4ed4501..f7314f4 100644
--- a/pyparted-3.9.5-rhbz1196402.patch
+++ b/pyparted-3.9.5-rhbz1196402.patch
@@ -403,6 +403,209 @@ diff -up pyparted-3.9.5/setup.py.orig pyparted-3.9.5/setup.py
if not float(modversion) >= float(version):
sys.stderr.write("*** Minimum required %s version: %s, found: %s\n" % (module, version, modversion,))
sys.exit(1)
+diff -up pyparted-3.9.5/src/parted/alignment.py.orig pyparted-3.9.5/src/parted/alignment.py
+--- pyparted-3.9.5/src/parted/alignment.py.orig 2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/parted/alignment.py 2015-04-24 16:14:05.875767442 -0400
+@@ -45,7 +45,7 @@ class Alignment(object):
+ self.__alignment = _ped.Alignment(kwargs.get("offset"),
+ kwargs.get("grainSize"))
+ else:
+- raise parted.AlignmentException, "no offset+grainSize or PedAlignment specified"
++ raise parted.AlignmentException("no offset+grainSize or PedAlignment specified")
+
+ offset = property(lambda s: s.__alignment.offset, lambda s, v: setattr(s.__alignment, "offset", v))
+ grainSize = property(lambda s: s.__alignment.grain_size, lambda s, v: setattr(s.__alignment, "grain_size", v))
+@@ -106,10 +106,10 @@ class Alignment(object):
+ """Determine whether sector lies inside geom and satisfies the
+ alignment constraint self."""
+ if not geom:
+- raise TypeError, "missing parted.Geometry parameter"
++ raise TypeError("missing parted.Geometry parameter")
+
+ if sector is None:
+- raise TypeError, "missing sector parameter"
++ raise TypeError("missing sector parameter")
+
+ return self.__alignment.is_aligned(geom.getPedGeometry(), sector)
+
+diff -up pyparted-3.9.5/src/parted/constraint.py.orig pyparted-3.9.5/src/parted/constraint.py
+--- pyparted-3.9.5/src/parted/constraint.py.orig 2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/parted/constraint.py 2015-04-24 16:15:10.650767442 -0400
+@@ -80,7 +80,7 @@ class Constraint(object):
+ self.__constraint = _ped.Constraint(starta, enda, startr, endr,
+ mins, maxs)
+ else:
+- raise parted.ConstraintException, "missing initialization parameters"
++ raise parted.ConstraintException("missing initialization parameters")
+
+ def __eq__(self, other):
+ return not self.__ne__(other)
+diff -up pyparted-3.9.5/src/parted/device.py.orig pyparted-3.9.5/src/parted/device.py
+--- pyparted-3.9.5/src/parted/device.py.orig 2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/parted/device.py 2015-04-24 16:15:40.418767442 -0400
+@@ -53,7 +53,7 @@ class Device(object):
+ elif path is not None:
+ self.__device = _ped.device_get(path)
+ else:
+- raise parted.DeviceException, "no path or PedDevice specified"
++ raise parted.DeviceException("no path or PedDevice specified")
+
+ def __eq__(self, other):
+ return not self.__ne__(other)
+@@ -293,7 +293,7 @@ class Device(object):
+ lunit = unit.lower()
+
+ if lunit not in parted._exponent.keys():
+- raise SyntaxError, "invalid unit %s given" % (unit,)
++ raise SyntaxError("invalid unit %s given" % unit)
+
+ size = float(self.__device.length)
+ size /= math.pow(1024.0, parted._exponent[lunit])
+diff -up pyparted-3.9.5/src/parted/disk.py.orig pyparted-3.9.5/src/parted/disk.py
+--- pyparted-3.9.5/src/parted/disk.py.orig 2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/parted/disk.py 2015-04-24 16:13:15.763767442 -0400
+@@ -46,7 +46,7 @@ class Disk(object):
+ else:
+ self._device = device
+ elif device is None:
+- raise parted.DiskException, "no device specified"
++ raise parted.DiskException("no device specified")
+ else:
+ self.__disk = _ped.Disk(device.getPedDevice())
+ self._device = device
+@@ -245,7 +245,7 @@ class Disk(object):
+ result = self.__disk.add_partition(partition.getPedPartition(),
+ constraint.getPedConstraint())
+ elif not partition:
+- raise parted.DiskException, "no partition or constraint specified"
++ raise parted.DiskException("no partition or constraint specified")
+ else:
+ result = self.__disk.add_partition(partition.getPedPartition())
+
+@@ -264,7 +264,7 @@ class Disk(object):
+ actually destroyed unless you use the deletePartition()
+ method."""
+ if not partition:
+- raise parted.DiskException, "no partition specified"
++ raise parted.DiskException("no partition specified")
+
+ if self.__disk.remove_partition(partition.getPedPartition()):
+ self.partitions.invalidate()
+@@ -299,10 +299,10 @@ class Disk(object):
+ does not modify the partition contents, just the partition
+ table."""
+ if not partition or not constraint:
+- raise parted.DiskException, "no partition or constraint specified"
++ raise parted.DiskException("no partition or constraint specified")
+
+ if not start or not end:
+- raise parted.DiskException, "no start or end geometry specified"
++ raise parted.DiskException("no start or end geometry specified")
+
+ return self.__disk.set_partition_geom(partition.getPedPartition(),
+ constraint.getPedConstraint(),
+@@ -313,7 +313,7 @@ class Disk(object):
+ """Grow the Partition's Geometry to the maximum possible subject
+ to Constraint."""
+ if not partition:
+- raise parted.DiskException, "no partition specified"
++ raise parted.DiskException("no partition specified")
+
+ if constraint:
+ return self.__disk.maximize_partition(partition.getPedPartition(),
+@@ -326,7 +326,7 @@ class Disk(object):
+ """Get the maximum Geometry the Partition can be grown to,
+ subject to the given Constraint."""
+ if not partition:
+- raise parted.DiskException, "no partition specified"
++ raise parted.DiskException("no partition specified")
+
+ if constraint:
+ return parted.Geometry(PedGeometry=self.__disk.get_max_partition_geometry(partition.getPedPartition(), constraint.getPedConstraint()))
+diff -up pyparted-3.9.5/src/parted/filesystem.py.orig pyparted-3.9.5/src/parted/filesystem.py
+--- pyparted-3.9.5/src/parted/filesystem.py.orig 2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/parted/filesystem.py 2015-04-24 16:13:37.291767442 -0400
+@@ -38,9 +38,9 @@ class FileSystem(object):
+
+ if PedFileSystem is None:
+ if type is None:
+- raise parted.FileSystemException, "no type specified"
++ raise parted.FileSystemException("no type specified")
+ elif geometry is None:
+- raise parted.FileSystemException, "no geometry specified"
++ raise parted.FileSystemException("no geometry specified")
+
+ self._type = type
+ self._geometry = geometry
+diff -up pyparted-3.9.5/src/parted/geometry.py.orig pyparted-3.9.5/src/parted/geometry.py
+--- pyparted-3.9.5/src/parted/geometry.py.orig 2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/parted/geometry.py 2015-04-24 16:12:14.740767442 -0400
+@@ -60,7 +60,7 @@ class Geometry(object):
+ self._device = device
+ self.__geometry = _ped.Geometry(self.device.getPedDevice(), start, length, end=end)
+ else:
+- raise parted.GeometryException, "must specify PedGeometry or (device, start, length) or (device, start, end) or (device, start, length, end)"
++ raise parted.GeometryException("must specify PedGeometry or (device, start, length) or (device, start, end) or (device, start, length, end)")
+
+ def __eq__(self, other):
+ return not self.__ne__(other)
+@@ -126,7 +126,7 @@ class Geometry(object):
+ size = self.length * self.device.sectorSize
+
+ if lunit not in parted._exponent.keys():
+- raise SyntaxError, "invalid unit %s given" % (unit,)
++ raise SyntaxError("invalid unit %s given" % unit)
+
+ return (size / math.pow(1024.0, parted._exponent[lunit]))
+
+diff -up pyparted-3.9.5/src/parted/__init__.py.orig pyparted-3.9.5/src/parted/__init__.py
+--- pyparted-3.9.5/src/parted/__init__.py.orig 2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/parted/__init__.py 2015-04-24 16:11:37.228767442 -0400
+@@ -413,7 +413,7 @@ def freshDisk(device, ty):
+ if type(ty) == str:
+ ty = diskType[ty]
+ elif not isinstance(ty, DiskType):
+- raise SyntaxError, "type must be a key or value in parted.diskType"
++ raise SyntaxError("type must be a key or value in parted.diskType")
+
+ peddisk = disk_new_fresh(device.getPedDevice(), ty)
+ return Disk(PedDisk=peddisk)
+diff -up pyparted-3.9.5/src/parted/partition.py.orig pyparted-3.9.5/src/parted/partition.py
+--- pyparted-3.9.5/src/parted/partition.py.orig 2015-04-24 14:46:46.312767442 -0400
++++ pyparted-3.9.5/src/parted/partition.py 2015-04-24 16:14:49.467767442 -0400
+@@ -38,11 +38,11 @@ class Partition(object):
+ def __init__(self, disk=None, type=None, fs=None, geometry=None, PedPartition=None):
+ if PedPartition is None:
+ if disk is None:
+- raise parted.PartitionException, "no disk specified"
++ raise parted.PartitionException("no disk specified")
+ elif type is None:
+- raise parted.PartitionException, "no type specified"
++ raise parted.PartitionException("no type specified")
+ elif geometry is None:
+- raise parted.PartitionException, "no geometry specified"
++ raise parted.PartitionException("no geometry specified")
+
+ self._fileSystem = fs
+ self._geometry = geometry
+@@ -96,7 +96,7 @@ class Partition(object):
+ return s
+
+ def __writeOnly(self, property):
+- raise parted.WriteOnlyProperty, property
++ raise parted.WriteOnlyProperty(property)
+
+ @property
+ @localeC
+@@ -224,7 +224,7 @@ class Partition(object):
+ lunit = unit.lower()
+
+ if lunit not in parted._exponent.keys():
+- raise SyntaxError, "invalid unit %s given" % (unit,)
++ raise SyntaxError("invalid unit %s given" % unit)
+
+ maxLength = self.geometry.length
+ sectorSize = self.geometry.device.sectorSize
diff -up pyparted-3.9.5/src/pyconstraint.c.orig pyparted-3.9.5/src/pyconstraint.c
--- pyparted-3.9.5/src/pyconstraint.c.orig 2014-06-24 13:06:32.000000000 -0400
+++ pyparted-3.9.5/src/pyconstraint.c 2015-04-24 15:23:08.200767442 -0400
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/pyparted.git/commit/?h=f21&id=ee2ec6a6569737a9820b2481ae0dcb886db11376
More information about the scm-commits
mailing list