Ensure that command line tools use LF line endings to work on Linux/OS X #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Command line tools,
pdf2txt.py
anddumppdf.py
, does not work when installed via pip on Linux/OS X.This is because
tools/pdf2txt.py
andtools/dumppdf.py
uploaded on the PyPI contain CRLF line endings. The line endings should be LF to work on Linux/OS X.Note that installing by
python setup.py install
does not cause this issue because setuptools generates a wrapper script forpdf2txt.py
anddumppdf.py
which have LF line endings. However I believe PDFMiner.six should be installable via pip because pip is a de facto standard package manager in Python community today.Changes
This PR add
.gitattributes
to ensure that*.py
files are always checked out with LF line endings regardless of individual's git settings even on Windows. I believe the PR will fix the problem and prevent future regression. After adding.gitattributes
, you may need to reset all files to get LF line endings by:See also:
Dealing with line endings - User Documentation
https://help.github.com/articles/dealing-with-line-endings/