matomo-log-analytics
matomo-log-analytics copied to clipboard
Please comply with PEP 394 in import_logs.py
Expected Behavior
When running lintian on the matomo debian package I shouldn't get this warning:
W: matomo: unusual-interpreter usr/share/matomo/misc/log-analytics/import_logs.py #!/usr/bin/python
According to python PEP 394 (https://www.python.org/dev/peps/pep-0394/), we should provide python2 or python3, but not just python. Which one to choose?
I can make the change on the fly in the building of the Debian package, but I wonder if it won't be better to deal with it directly in Matomo. PEP 394 is for Unix-Like Systems and Debian is one of them. I don't know about Windows and others.
Just tell me.
Possible Solution
- Specify the version in matomo/misc/log-analytics/import_logs.py first line
- Make a script to change this line on the fly when building the Debian package
Thanks for bringing this up. We used to have that script compatible with python2 and python3. But as python2 support was dropped it might be fine to change that. But I'm actually not sure how that behaves on Windows. So might be better for now to change that on the fly on your site I would say.