Skip to content

Commit 4a37df2

Browse files
committed
works with python 2 and 3!
git-svn-id: https://python-poppler-qt4.googlecode.com/svn/trunk/python-poppler-qt4@50 83130c62-50b3-82d2-30ac-6e1d6613df04
1 parent cb8771e commit 4a37df2

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Version 0.18.0 --
2+
3+
* Works with both Python 2 and Python 3 (tested 2.6, 2.7, 3.2.3)
4+
* added some new methods
5+
* fixed FormField issue
6+
* setup.py circumvents sipdistutils < 4.14.2 not working with python 3
7+
18
Version 0.16.3 -- November 9th, 2012
29

310
* Enable build with Poppler 0.18 and 0.20 (new api not yet)

TODO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
TODO:
22

3-
- test Python versions other than 2.6
4-
- add some examples
53

64
DONE:
75
- Poppler::Document::newFontIterator() is usable as Python iterable
86
- Poppler::HighlightAnnotation::Quad.points has been fixed
97
- support Poppler::InkAnnotation::inkPaths() and setInkPaths()
108
- cast returned lists of objects like Document::links() to their respective types
119
- convert to and from QLinkedList
10+
- test Python versions other than 2.6: 3.2.3 works
11+
- add some examples: demo.py added
1212

setup.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
project = dict(
44
name = 'python-poppler-qt4',
5-
version = '0.16.3',
5+
version = '0.18.0',
66
description = 'A Python binding to Poppler-Qt4',
77
long_description = \
88
'A Python binding to Poppler-Qt4 that aims for ' \
@@ -12,16 +12,19 @@
1212
url = 'http://python-poppler-qt4.googlecode.com/',
1313
license = 'LGPL',
1414
classifiers = [
15-
'Development Status :: 4 - Beta',
15+
'Development Status :: 5 - Production/Stable',
1616
'Intended Audience :: Developers',
1717
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
1818
'Operating System :: MacOS :: MacOS X',
1919
'Operating System :: Microsoft :: Windows',
2020
'Operating System :: POSIX',
2121
'Programming Language :: Python',
22+
'Programming Language :: Python :: 2.6',
23+
'Programming Language :: Python :: 2.7',
24+
'Programming Language :: Python :: 3',
2225
'Topic :: Multimedia :: Graphics :: Viewers',
2326
],
24-
cmdclass={}
27+
cmdclass={}
2528
)
2629

2730
import os
@@ -38,6 +41,18 @@
3841

3942
import sipdistutils
4043

44+
### this circumvents a bug in sip < 4.14.2, where the file() builtin is used
45+
### instead of open()
46+
try:
47+
import builtins
48+
try:
49+
builtins.file
50+
except AttributeError:
51+
builtins.file = open
52+
except ImportError:
53+
pass
54+
### end
55+
4156
import PyQt4.pyqtconfig
4257
config = PyQt4.pyqtconfig.Configuration()
4358

0 commit comments

Comments
 (0)