Package: bittornado
Version: 0.3.18-10
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu oneiric ubuntu-patch

python-support is now officially deprecated in Debian:

http://article.gmane.org/gmane.linux.debian.devel.python/6948

Attached is a patch which converts file to use the recommended dh_python2.
It follows this guide:
http://wiki.debian.org/Python/TransitionToDHPython2

changes in ubuntu:

  * switch to dh_python2 (LP: #788514)
    - install btmakemetafile.py and btcompletedir.py via pyinstall
    - add build depend on python-all
    - bump debhelper depend to 7 for dh_auto_install



-- System Information:
Debian Release: wheezy/sid
  APT prefers oneiric-updates
  APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 
'oneiric'), (100, 'oneiric-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-8-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
=== modified file 'debian/bittornado-gui.install'
--- debian/bittornado-gui.install       2007-04-22 13:56:24 +0000
+++ debian/bittornado-gui.install       2011-08-10 22:15:36 +0000
@@ -1,2 +1,3 @@
-usr/bin/*gui*
+usr/bin/*gui*.bittornado
+usr/bin/btmaketorrentgui
 usr/share/pixmaps

=== modified file 'debian/bittornado.install'
--- debian/bittornado.install   2006-10-27 15:46:48 +0000
+++ debian/bittornado.install   2011-08-10 21:48:40 +0000
@@ -10,4 +10,4 @@
 usr/bin/btsethttpseeds
 usr/bin/btshowmetainfo.bittornado
 usr/bin/bttrack.bittornado
-usr/share/python-support/bittornado
+usr/lib/python2*

=== added file 'debian/bittornado.pyinstall'
--- debian/bittornado.pyinstall 1970-01-01 00:00:00 +0000
+++ debian/bittornado.pyinstall 2011-08-10 22:33:00 +0000
@@ -0,0 +1,2 @@
+debian/tmp/usr/bin/btmakemetafile.py BitTornado
+debian/tmp/usr/bin/btcompletedir.py BitTornado

=== modified file 'debian/changelog'

=== modified file 'debian/control'
--- debian/control      2011-01-24 17:27:47 +0000
+++ debian/control      2011-08-10 22:43:09 +0000
@@ -3,8 +3,8 @@
 Priority: optional
 Maintainer: Cameron Dale <camrd...@gmail.com>
-Build-Depends: debhelper (>= 5.0.37.2)
-Build-Depends-Indep: python, python-support (>= 0.5.4), docbook-to-man
+Build-Depends: debhelper (>= 7)
+Build-Depends-Indep: python-all (>= 2.6.6-3~), docbook-to-man
 Standards-Version: 3.8.4
 Vcs-Svn: svn://svn.debian.org/pkg-bittornado/bittornado/trunk
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-bittornado/bittornado/trunk/

=== modified file 'debian/rules'
--- debian/rules        2010-03-21 14:36:30 +0000
+++ debian/rules        2011-08-10 22:34:39 +0000
@@ -31,23 +31,14 @@
        dh_installdirs
 
        # Add here commands to install the package into debian/bittornado.
-       chmod +x ./setup.py
-       ./setup.py install --prefix=$(CURDIR)/debian/tmp/usr 
--install-lib=$(CURDIR)/debian/tmp/usr/share/python-support/bittornado
+       dh_auto_install -- --root=$(CURDIR)/debian/tmp
 
        install -d debian/tmp/usr/share/mimelnk/application
 
        install -D -m644 debian/bittornado.desktop 
debian/bittornado-gui/usr/share/applications/bittornado.desktop
        install -D -m644 debian/bittornado.xpm 
debian/tmp/usr/share/pixmaps/bittornado.xpm
        install -d debian/tmp/usr/share/bittorrent
-       chmod 755 
debian/tmp/usr/share/python-support/bittornado/BitTornado/launchmanycore.py
-       cp debian/tmp/usr/bin/btmakemetafile.py 
debian/tmp/usr/share/python-support/bittornado/BitTornado
-       cp debian/tmp/usr/bin/btcompletedir.py 
debian/tmp/usr/share/python-support/bittornado/BitTornado
 
-       # Remove the generated .pyc files
-       ( cd debian/tmp/usr/share/python-support/bittornado/BitTornado && \
-         rm -f *.pyc  && \
-         cd BT1 && \
-         rm -f *.pyc )
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -59,14 +50,15 @@
        dh_installmime
        dh_installman
        
-       # Remove the .py from the end of each of these and add .bittornado
-       # so that the alternatives system can work
+       # create versions with .bittornado suffix so that the alternatives
+       # system can work. the .py extensions are not installed.
+       # btmakemetafile.py and btcompletedir.py is needed for pyinstall
        ( cd debian/tmp/usr/bin && \
          for i in btdownloadgui btdownloadheadless bttrack btmakemetafile \
                   btlaunchmany btcompletedir btcompletedirgui \
                   btdownloadcurses btlaunchmanycurses btreannounce btrename \
                   btshowmetainfo; \
-         do mv $$i.py $$i.bittornado || exit 1 ; done )
+         do cp $$i.py $$i.bittornado || exit 1 ; done )
        
        # Remove the .py from the end of each of these, the following are not
        # included in bittorrent, so they are not renamed to having the
@@ -80,7 +72,7 @@
        dh_link
        dh_compress
        dh_fixperms
-       dh_pysupport
+       dh_python2
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol

Reply via email to