Feneric / doxypypy

A more Pythonic version of doxypy, a Doxygen filter for Python.
GNU General Public License v2.0
149 stars 49 forks source link

Hardcoded python version in script shebang #35

Open leamas opened 7 years ago

leamas commented 7 years ago

The first line of the doxypypy.py script is

#!/usr/bin/env python

This creates a dependency on whatever python version 'python' refers to. Which in turn leads to non-obvious parser crashes when using python3 code if the system python version is 2.x

Possible fix is to remove the shebang and ujpdate instructions to use 'python doxypypy.py' instead (or an explicit python3).

Other work-arounds would be a wrapper which accepts some kind of python2/python3 option, but with a developer userbase I don't think this is necessary.

Feneric commented 7 years ago

Usually I think that's what people want. If they choose to use a different version of Python, they already can do the '/my/special/python doxypypy.py' instead and it'll run using that specific Python version; there's no need to force everyone to type the extra characters. In fact that's how we test against both Python 2 & Python 3.

leamas commented 7 years ago

It your show. But a default python2 interpreter combined with developing python3 code is certainly not an edge case. In the uncertainty created by a new tool this took me quite some time, and I guess more than me will run into it

As usual, in hindsight it's obvious. But that's hindsight...

Feneric commented 7 years ago

That's fair; at minimum the docs should point it out more. Probably they should also explicitly cover its usage within a virtualenv. AFAICT the majority of doxypypy users are in Python 2 land, and I wouldn't be at all surprised if this is even somewhat related to the reasons why most distros are still using Python 2 for their default system Python.

buhtz commented 2 years ago

I think 5 years later the situation is clear. Remove Python2 support and close this Issue. ;)

Btw: I do not see why I should run doxypypy as a standalone script? So why does I need a shebang in it? Can you give a use-case for this?

I use doxypypy via the py_filter.py script configured to Doxygen.