summaryrefslogtreecommitdiff
path: root/media-sound/ytm-player/ytm-player-1.7.2.ebuild
blob: 7fea85144bb7b5fdd07d4fd18dbebbd0269e5f1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=hatchling
PYTHON_COMPAT=( python3_{10..14} )

inherit distutils-r1 optfeature

DESCRIPTION="Full-featured YouTube Music TUI client with vim-style navigation"
HOMEPAGE="https://github.com/peternaame-boop/ytm-player"

if [[ ${PV} == *9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/peternaame-boop/ytm-player.git"
else
	SRC_URI="https://github.com/peternaame-boop/ytm-player/archive/v${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64"
fi

LICENSE="MIT"
SLOT="0"

DOCS=(
	{README,CHANGELOG,SECURITY}.md
	docs/
)

RDEPEND="
	media-video/mpv
	>=net-misc/yt-dlp-2025.01.12[${PYTHON_USEDEP}]
	>=dev-python/aiosqlite-0.20.0[${PYTHON_USEDEP}]
	>=dev-python/click-8.1.0[${PYTHON_USEDEP}]
	>=dev-python/python-mpv-1.0.0[${PYTHON_USEDEP}]
	>=dev-python/pillow-10.0[${PYTHON_USEDEP}]
	>=dev-python/textual-7.0.0[${PYTHON_USEDEP}]
	>=dev-python/ytmusicapi-1.11.0[${PYTHON_USEDEP}]
"

BDEPEND="
	test? (
		dev-python/anyascii[${PYTHON_USEDEP}]
	)
"

EPYTEST_PLUGINS=( pytest-asyncio )
distutils_enable_tests pytest

pkg_postinst() {
	optfeature "MPRIS media key support" dev-python/dbus-next
	optfeature "last.fm scrobbling" dev-python/pylast
	optfeature "Discord rich presence" dev-python/pypresence
	optfeature "spotify playlist import" dev-python/spotipy # spotifyscraper & thefuzz are not packaged
	optfeature "lyrics transliteration to ASCII" dev-python/anyascii
}

python_test() {
	# The default portage tempdir is too long for AF_UNIX sockets
	local -x TMPDIR=/tmp
	epytest
}