-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes needed to be able to compile pdfminer.six with Cython #142
Conversation
I'm quite interested in this. I've made some other improvements to speed up processing for certain inputs (#133, #141), but my next target for speeding up is |
pdfminer/ccitt.py
Outdated
@@ -15,6 +15,8 @@ | |||
|
|||
import six #Python 2+3 compatibility | |||
|
|||
import unittest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this needed for? Was it included by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved in the main()
and/or the main removed entirely and moved to some testing script outside of the main library code
setup.py
Outdated
@@ -3,7 +3,7 @@ | |||
|
|||
import pdfminer as package | |||
|
|||
requires = ['six', 'pycryptodome'] | |||
requires = ['six', 'pycryptodome', 'pygame'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, what is pygame
needed for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mawoqiw I think we should not add pygame as a dep... instead it should be removed. When was this introduced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This main()
should be removed entirely and moved to some testing script outside of the main library code and we cannot add pygame as a runtime dep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right @pombredanne. pygame
is indeed not required to use Cython, thanks.
With regards to main()
function I would rather deal with it in a different merge request. Do you have any idea what is the purpose of that code?
One of the tests is using |
Per comment in the original project euske/pdfminer#140 compiling PDFMiner with Cython leads to substantial speed improvements. Submitted fixes are necessary to be able to compile pdfminer.six, otherwise compiler fails.