beetbox / beets

music library manager and MusicBrainz tagger
http://beets.io/
MIT License
12.57k stars 1.8k forks source link

Remove the `beet` executable and update shebangs #5303

Closed bal-e closed 2 weeks ago

bal-e commented 2 weeks ago

Description

This is a very simple PR, just removing the (apparently unused) beet executable from the repository and substituting bin/env python for bin/python3 where possible.

Fixes #4604.

To Do

bal-e commented 2 weeks ago

I'm using this as a quick testing ground for #5305, hence the strange rebase. I'll re-adjust it once the checks complete.

bal-e commented 2 weeks ago

Restored, ready for review / merge.

Serene-Arc commented 2 weeks ago

Hmm, does this impact calling beets on the command with beet?

bal-e commented 2 weeks ago

In a venv, I ran poetry install and checked $(which beet). It's definitely a different script than the one I removed from the repository (I'm sure it's automatically generated):

#!<path/to/my/venv>/bin/python
import sys
from beets.ui import main

if __name__ == '__main__':
    sys.exit(main())

So as long as Poetry is being used to build beets, which it should be, everything should be fine. Even the /usr/bin/beet which is part of the Arch Linux beets package looks like a different file.

Serene-Arc commented 2 weeks ago

Wonderful, should be fine to remove then.

wisp3rwind commented 2 weeks ago

For context: The script that is actually being installed is generated by poetry via the sripts configuration in pyproject.toml (previously, it was generated via entry_points in setup.py.

Serene-Arc commented 2 weeks ago

Great, wasn't entirely sure and I thought it best to double check! Don't want to suddenly be unable to use beet as a command

bal-e commented 2 weeks ago

Yeah, absolutely! Honestly, I should've investigated how the actual beet executable was generated a bit better before making the PR. Thanks for making sure!