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

Remove the beet executable and update shebangs #5303

Merged
merged 3 commits into from
Jun 15, 2024

Conversation

bal-e
Copy link
Member

@bal-e bal-e commented Jun 14, 2024

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

  • Documentation.
  • Changelog.
  • Tests.

Arav K. added 3 commits June 14, 2024 14:41
Apparently, this script isn't actually used for anything; the build
system will automatically generate a script like this when installing
`beets`.

See <beetbox#4604>.
While Python 2 is long dead, and a 'bin/env python' shebang is probably
perfectly fine, this is just a bit safer.

See <beetbox#4604>.
@bal-e
Copy link
Member Author

bal-e commented Jun 14, 2024

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 bal-e marked this pull request as draft June 14, 2024 15:32
@bal-e bal-e marked this pull request as ready for review June 14, 2024 15:35
@bal-e bal-e force-pushed the update-shebangs branch 3 times, most recently from f80e461 to 8b3890b Compare June 14, 2024 17:09
@bal-e
Copy link
Member Author

bal-e commented Jun 14, 2024

Restored, ready for review / merge.

@Serene-Arc
Copy link
Contributor

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

@bal-e
Copy link
Member Author

bal-e commented Jun 15, 2024

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
Copy link
Contributor

Wonderful, should be fine to remove then.

@Serene-Arc Serene-Arc merged commit 8a28fd5 into beetbox:master Jun 15, 2024
18 checks passed
@bal-e bal-e deleted the update-shebangs branch June 15, 2024 01:17
@wisp3rwind
Copy link
Member

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
Copy link
Contributor

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
Copy link
Member Author

bal-e commented Jun 15, 2024

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!

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.

Update /usr/bin shebangs to Python3?
3 participants