-
Notifications
You must be signed in to change notification settings - Fork 906
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
pdf2txt.py and pdfdump.py should have a shebang #405
Comments
I think I removed some in the past because I did not understood what they are for. Adding them adds another way of interacting with pdfminer.six; using I think its a good thing if we introduce them again. Are there shebangs that work for all kinds of python environments (e.g. conda, virtualenv, pipenv, system python, etc.)? Also see #217 |
Yes, it should work with most of python environments even if I'm not sure on the compatibility with Windows. Note that additionnaly I didn't get the opportunity to test with conda. |
According to the python docs it is also compatible with windows. |
They define how to run a program on Unix. Since they are installed as command-line executables in Lines 31 to 34 in d79bcb7
there is no choice: they must have those shebangs, and to do otherwise is utterly broken. For compatibility with ancient Unix systems, there is a fallback to try (and fail) to execute them as shell scripts.
|
Both scripts in tools/ doesn't contain python interpreter line (#!/usr/bin/env python) which prevent their correct execution when packaged and installed.
From https://bugs.archlinux.org/task/65939 :
#!/usr/bin/env python was removed from pdf2txt.py by [1] [2] and from duppdf.py by [3] [4].
The commit messages do not explain the removal while commit [5] notes the need for them.
[1] bc034c8
[2] d93a73f
[3] 6cc78ee
[4] 7aa180d
[5] 0fdebc6
The text was updated successfully, but these errors were encountered: