Bug#521726: python-pymtp: needs upating of depends fromlibmtp7 to libmtp8

2009-04-02 Thread Rafael Laboissiere
* Adeodato Simó  [2009-04-02 20:41]:

> Great, I’ll be waiting for the upload and then do the migration.

I prepared the NMU, which can be accessed here:

dget http://people.debian.org/~rafael/pymtp/pymtp_0.0.4-1.1.dsc

Thomas, please test it.  I added quilt support to the package in order to
introduce my patch.  I also did a minimal change in debian/rule for
removing of the build/directory in the clean rule.  The entry in
debian/changelog reads as below.  The debdiff is attached to this
message.

If I do not hear from you soon I will assume that everything is okay and
upload the package to unstable.

Cheers,
 
Rafael Laboissiere

= debian/rules ==
pymtp (0.0.4-1.1) unstable; urgency=low

  * Non-maintainer upload, for unblocking the libmtp7 -> libmtp8
transition (closes: #521726), with approval of the package maintainer
and the Debian Release Team, cf :
http://lists.debian.org/debian-release/2009/04/msg00018.html
  * debian/control:
+ (Depends) Depends on libmtp8
+ (Build-Depends) Add quilt
  * debian/patches/adapt-to-libmtp8.diff: Adapt upstream source to
libmtp8:
+ pymtp.py: Functions changed:
  - MTP.send_file_from_file
  - MTP.send_track_from_file
  - MTP.create_new_playlist
  - MTP.create_folder
+ examples/send{file,track}.py: Adjust
  * debian/rules (clean):
+ (build, clean) Adapt to quilt
+ (clean) Remove build/ directory

 -- Rafael Laboissiere   Thu, 02 Apr 2009 22:17:24 +0200
reverted:
--- pymtp-0.0.4/build/lib/pymtp.py
+++ pymtp-0.0.4.orig/build/lib/pymtp.py
@@ -1,1216 +0,0 @@
-#!/usr/bin/env python
-#
-# A Ctypes wrapper to LibMTP
-# Developed by: Nick Devito (n...@nick125.com)
-# (c) 2008 Nick Devito
-# Released under the GPLv3 or later.
-#
-
-"""
-	PyMTP is a pythonic wrapper around libmtp, making it a bit more 
-	friendly to use in python
-
-	Example Usage (or see examples/):
-		>>> import pymtp
-		>>> mtp = pymtp.MTP()
-	>>> mtp.connect()
-		PTP: Opening session
-	>>> print mtp.get_devicename()
-	Device name
-	>>> mtp.disconnect()
-		PTP: Closing session
-		>>>
-"""
-
-__VERSION__ = "0.0.4"
-__VERSION_MACRO__ = 4
-__VERSION_MINOR__ = 0
-__VERSION_MAJOR__ = 0
-__VERSION_TUPLE__ = (__VERSION_MAJOR__, __VERSION_MINOR__, __VERSION_MACRO__)
-__AUTHOR__ = "Nick Devito (n...@nick125.com)"
-__LICENSE__ = "GPL-3"
-__DEBUG__ = 1
-
-import os
-import ctypes
-import ctypes.util
-
-# NOTE: This code *may* work on windows, I don't have a win32 system to test
-# this on. 
-_module_path = ctypes.util.find_library("mtp") 
-_libmtp = ctypes.CDLL(_module_path)
-
-# --
-# Error Definitions
-# --
-class NoDeviceConnected(Exception): 
-	"""
-		Raised when there isn't a device connected to the USB bus 
-	"""
-
-	pass
-
-class AlreadyConnected(Exception):
-	"""
-		Raised when we're already connected to a device and there is 
-		an attempt to connect
-	"""
-
-	pass
-	
-class UnsupportedCommand(Exception): 
-	"""
-		Raised when the connected device does not support the command 
-		issued
-	"""
-
-	pass
-
-class CommandFailed(Exception): 
-	"""
-		Raised when the connected device returned an error when trying 
-		to execute a command
-	"""
-
-	pass
-
-class NotConnected(Exception): 
-	"""
-		Raised when a command is called and the device is not connected
-	"""
-
-	pass
-
-class ObjectNotFound(Exception):
-	"""
-		Raised when a command tries to get an object that doesn't exist
-	"""
-
-	pass
-
-# --
-# End Error Definitions
-# --
-
-# --
-# Data Model Definitions
-# --
-
-class LIBMTP_Error(ctypes.Structure):
-	"""
-		LIBMTP_Error
-		Contains the ctypes structure for LIBMTP_error_t
-	"""
-
-	def __repr__(self):
-		return self.errornumber
-
-LIBMTP_Error._fields_ = [("errornumber", ctypes.c_int),
- ("error_text", ctypes.c_char_p),
- ("next", ctypes.POINTER(LIBMTP_Error))]
-
-class LIBMTP_DeviceStorage(ctypes.Structure):
-	"""
-		LIBMTP_DeviceStorage
-		Contains the ctypes structure for LIBMTP_devicestorage_t
-	"""
-
-	def __repr__(self):
-		return self.id
-
-LIBMTP_DeviceStorage._fields_ = [("id", ctypes.c_uint32),
- ("StorageType", ctypes.c_uint16),
- ("FilesystemType", ctypes.c_uint16),
- ("AccessCapability", ctypes.c_uint16),
- ("MaxCapacity", ctypes.c_uint64),
- ("FreeSpaceInBytes", ctypes.c_uint64),
- ("FreeSpaceInObjects", ctypes.c_uint64),
- ("StorageDescription", ctypes.c_char_p),
- ("VolumeIdentifier", ctypes.c_char_p),
- ("next", ctypes.POINTER(LIBMTP_DeviceStorage)),
- ("prev", ctypes.POINTER(LIBMTP_DeviceStorage))]
-
-class LIBMTP_MTPDevice(ctypes.Struc

Bug#521726: python-pymtp: needs upating of depends fromlibmtp7 to libmtp8

2009-04-02 Thread Adeodato Simó
* Rafael Laboissiere [Thu, 02 Apr 2009 16:50:53 +0200]:

> * Thomas Perl  [2009-04-02 14:37]:

> > I am fine with you NMUing pymtp. I can test your modifications locally
> > with an MTP device here before you upload, if you want (or tell me if
> > the debdiff you posted above is already what you intend to upload).

> Please, test my changes.

> Yes, it is what I intend to upload.  Notice that the debdiff contains the
> changes to the upstream files in the .diff.gz. file.  It would be better
> to use quilt for that.

Great, I’ll be waiting for the upload and then do the migration.

Thomas, you accidentally dropped debian-release from the discussion;
readding it now.

Cheers,

-- 
- Are you sure we're good?
- Always.
-- Rory and Lorelai




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#521726: python-pymtp: needs upating of depends fromlibmtp7 to libmtp8

2009-04-02 Thread Rafael Laboissiere
* Thomas Perl  [2009-04-02 14:37]:

> I am fine with you NMUing pymtp. I can test your modifications locally
> with an MTP device here before you upload, if you want (or tell me if
> the debdiff you posted above is already what you intend to upload).

Please, test my changes.

Yes, it is what I intend to upload.  Notice that the debdiff contains the
changes to the upstream files in the .diff.gz. file.  It would be better
to use quilt for that.

-- 
Rafael



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#521726: python-pymtp: needs upating of depends fromlibmtp7 to libmtp8

2009-04-02 Thread Thomas Perl
On Thu, Apr 02, 2009 at 02:19:44PM +0200, Rafael Laboissiere wrote:
> * Adeodato Simó  [2009-04-02 12:32]:
> What about uploading a version of the package with my patch referenced
> above?  I agree that it is not 100% tested, but the patch has the virtue to
> make pymtp work with libmtp8, at least in a simple test case.  If things go
> weird, for example if my patch introduces other serious bugs, then we remove
> pymtp from testing.
> 
> What do you think?  Ig the Release Team gives me the approval and Thomas
> Perl does not object, I would NMU pytmp, just to unblock the libmtp
> transition.

I am fine with you NMUing pymtp. I can test your modifications locally
with an MTP device here before you upload, if you want (or tell me if
the debdiff you posted above is already what you intend to upload).


Thanks,
Thomas




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#521726: python-pymtp: needs upating of depends fromlibmtp7 to libmtp8

2009-04-02 Thread Rafael Laboissiere
* Adeodato Simó  [2009-04-02 12:32]:

> * Rafael Laboissiere [Tue, 31 Mar 2009 03:03:29 +0200]:
>
> > [snip]
> > I merged both version for pymtp.py and the resulting debdiff is attached
> > below.  I tested it with a Zen Creative device and creation of a track
> > from file worked using the modified sendtrack.py script in the package
> > (notice that this script is patched to work with python-id3 instead of
> > using the pyid3lib module, which does not seem to be available in Debian).
> > [snip]
> 
> Indeed. I’d like to push this transition sooner rather than latter, so
> I’m considering a temporary removal of pymtp from testing, or maybe
> leaving libmtp7 around for a bit in testing, but I like that less.

What about uploading a version of the package with my patch referenced
above?  I agree that it is not 100% tested, but the patch has the virtue to
make pymtp work with libmtp8, at least in a simple test case.  If things go
weird, for example if my patch introduces other serious bugs, then we remove
pymtp from testing.

What do you think?  Ig the Release Team gives me the approval and Thomas
Perl does not object, I would NMU pytmp, just to unblock the libmtp
transition.

Cheers,
 
-- 
Rafael



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#521726: python-pymtp: needs upating of depends fromlibmtp7 to libmtp8

2009-04-02 Thread Adeodato Simó
* Rafael Laboissiere [Tue, 31 Mar 2009 03:03:29 +0200]:

> > > The following seems to work for users of MTP devices so far (see the
> > > attachment to that bug):
> > > http://bugs.gpodder.org/show_bug.cgi?id=307

> > Thanks for the info.  The changes to pymtp.py are different from those
> > that I proposed before.  I will test both versions eventually and will
> > let you know.

> My version was not working properly, so forget about the previous patch.

> I merged both version for pymtp.py and the resulting debdiff is attached
> below.  I tested it with a Zen Creative device and creation of a track
> from file worked using the modified sendtrack.py script in the package
> (notice that this script is patched to work with python-id3 instead of
> using the pyid3lib module, which does not seem to be available in Debian).

> I am Cc:ing this reply to the upstream author.  Let us see what he
> thinks.  Although it would need more tests, I would go ahead and upload
> this changed version of the package to unstable, otherwise the libmtp
> transiton will be blocked.  Indeed python-pymtp is the last blocker for
> the transition (Cc:ing also to debian-release, accordingly).

Indeed. I’d like to push this transition sooner rather than latter, so
I’m considering a temporary removal of pymtp from testing, or maybe
leaving libmtp7 around for a bit in testing, but I like that less.

Cheers,

-- 
- Are you sure we're good?
- Always.
-- Rory and Lorelai




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org