[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#677130: pyppd doesn't build with python3



Package: pyppd
Version: 0.4.9-7
Severity: serious
Tags: patch
Justification: fails to build from source (but built successfully in the
past)
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu quantal ubuntu-patch

Dear Maintainer,

This patch allows pyppd to build with python3. In addition I've tested
it with
python2.7.
This modifies the setup.py long_description variable to convert loaded data
into bytes first,
then to utf-8.

*** /tmp/tmpUEI3Df/bug_body
In Ubuntu, the attached patch was applied to achieve the following:

  * debian/patches/03_python3_setup.patch: setup.py long_description fixed
    to work with both python2 and 3.

Thanks for considering the patch.



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

Kernel: Linux 3.2.0-24-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

diff -Nru pyppd-0.4.9/debian/changelog pyppd-0.4.9/debian/changelog
diff -Nru pyppd-0.4.9/debian/patches/03_python3_setup.patch pyppd-0.4.9/debian/patches/03_python3_setup.patch
--- pyppd-0.4.9/debian/patches/03_python3_setup.patch	1969-12-31 18:00:00.000000000 -0600
+++ pyppd-0.4.9/debian/patches/03_python3_setup.patch	2012-06-11 11:59:36.000000000 -0500
@@ -0,0 +1,17 @@
+## Description: Fixes setup.py long_description to work with python3.
+## Author: Chris J Arges <chris.j.arges@canonical.com>
+Index: pyppd-0.4.9/setup.py
+===================================================================
+--- pyppd-0.4.9.orig/setup.py	2012-06-11 10:53:18.130693582 -0500
++++ pyppd-0.4.9/setup.py	2012-06-11 10:55:45.822691880 -0500
+@@ -28,8 +28,8 @@
+     url='http://gitorious.org/vitorbaptista/pyppd/',
+     license='GPLv3',
+     description='A CUPS PostScript Printer Driver\'s compressor and generator',
+-    long_description=open('README.txt').read() + "\n" +
+-                     open('ISSUES.txt').read(),
++    long_description=(open('README.txt', 'rb').read() + b"\n" +
++                     open('ISSUES.txt', 'rb').read()).decode("utf-8"),
+     cmdclass={'sdist': sdist},
+     classifiers=[
+         'Development Status :: 4 - Beta',
diff -Nru pyppd-0.4.9/debian/patches/series pyppd-0.4.9/debian/patches/series
--- pyppd-0.4.9/debian/patches/series	2012-06-05 02:52:15.000000000 -0500
+++ pyppd-0.4.9/debian/patches/series	2012-06-11 11:08:18.000000000 -0500
@@ -1,3 +1,4 @@
 00git_improve_runtime_error_handling.patch
 01_python3_compat.patch
 02_use_python3.patch
+03_python3_setup.patch


Reply to: