Closed ycollet closed 3 years ago
Indeed they should be fixed. Executable scripts without shebang is nonsense.
I attempted to fix it, but found out that I can't. Actually, most of those files were auto generated by "PyQt5 UI code generator", so it's PyQt5 which needs to be fixed (if it is not yet).
For example catarina_connectports.ui
:
# Form implementation generated from reading ui file 'resources/ui/catarina_connectports.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
Well, at least I fixed the rest of warnings: #306.
Since they won't accept patches, I've sent an email to support@riverbankcomputing.com:
Hi,
Files created by PyQt5 UI code generator are generally not designed to be executable. But if they really should have executable bit set, then it worth nothing that they should have proper #! shebang on the top.
The lack of shebang may cause weird installation warnings, e.g. on Fedora1.
To the best of my knowledge, it affects all versions of PyQt5 up to the latest 5.15.2 from PyPI.
I'm not submitting a patch because I don't want to interfere with Riverbank Computing Ltd. copyright policies, but I can at least make your job easier by pointing in the right direction. The header template which needs to be modified is located is located at
pyuic/uic/__init__.py
, and it is the only place in
project which contains literal string "PyQt5 UI code generator %s". Please, add a proper python shebang to it.-- Ivan https://ratijas.tk/
I got a reply, and it sounds like the issue is somewhere within Cadence build system.
Date: Mon, 30 Nov 2020 09:56:43 +0000 From: Phil Thompson phil@riverbankcomputing.com To: ivan tkachenko me@ratijas.tk Subject: Re: [BUG] Add shebang to generated UI files In-Reply-To: 2554059.z0zBN5RDjQ@getaway References: 2554059.z0zBN5RDjQ@getaway Message-ID: 90a78dffea9564b7d1e6ea251d95315e@riverbankcomputing.com
On 30/11/2020 02:45, ivan tkachenko wrote:
Hi,
Files created by PyQt5 UI code generator are generally not designed to be executable. But if they really should have executable bit set, then it worth nothing that they should have proper #! shebang on the top.
The lack of shebang may cause weird installation warnings, e.g. on Fedora1.
To the best of my knowledge, it affects all versions of PyQt5 up to the latest 5.15.2 from PyPI.
I'm not submitting a patch because I don't want to interfere with Riverbank Computing Ltd. copyright policies, but I can at least make your job easier by pointing in the right direction. The header template which needs to be modified is located is located at
pyuic/uic/__init__.py
, and it is the only place in project which contains literal string "PyQt5 UI code generator %s". Please, add a proper python shebang to it.pyuic5 does not create .py files with the execute bit set.
Phil
Hello, I made a rpm package of Cadence for Fedora 29. During packaging, some interesting warnings were displayed:
Maybe these warnings should be fixed in the current master.