Skip to content
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

Please comply with PEP 394 in import_logs.py #323

Open
e-gaulue opened this issue Nov 14, 2021 · 1 comment
Open

Please comply with PEP 394 in import_logs.py #323

e-gaulue opened this issue Nov 14, 2021 · 1 comment

Comments

@e-gaulue
Copy link

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

  1. Specify the version in matomo/misc/log-analytics/import_logs.py first line
  2. Make a script to change this line on the fly when building the Debian package
@e-gaulue e-gaulue changed the title Please comply with PEP 394 with import_logs.py Please comply with PEP 394 in import_logs.py Nov 14, 2021
@sgiehl
Copy link
Member

sgiehl commented Nov 14, 2021

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.

@sgiehl sgiehl transferred this issue from matomo-org/matomo Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants