Skip to content

Conversation

@cottsay
Copy link
Contributor

@cottsay cottsay commented Sep 24, 2018

A shebang is only used when a file is executed directly from the shell (e.g. ./filelock.py). This shebang should be removed for a couple of reasons, either of which render the shebang incorrect:

  1. The file does not have executable permissions, and even if it did, they would be removed when the file is installed.
  2. Executing the file doesn't do anything useful (it doesn't handle __main__).

This was flagged by the RPM linter when packaged for Fedora Linux.

@AdorablePotato AdorablePotato merged commit 3bf48f0 into tox-dev:master Oct 2, 2018
@AdorablePotato
Copy link
Contributor

Thanks, adding a shebang to all my Python files became somewhat a bad habit.

@cottsay cottsay deleted the shebang branch June 3, 2020 19:17
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

Successfully merging this pull request may close these issues.

2 participants