Files
guru/dev-python/srt/srt-3.5.2.ebuild
T

38 lines
866 B
Bash
Raw Normal View History

2022-03-07 12:50:36 +01:00
# Copyright 2022 Gentoo Authors
2021-07-26 10:51:12 +02:00
# Distributed under the terms of the GNU General Public License v2
EAPI=8
2022-03-07 12:50:36 +01:00
PYTHON_COMPAT=( python3_{8..10} )
2021-07-26 10:51:12 +02:00
inherit distutils-r1
DESCRIPTION="A tiny library for parsing, modifying, and composing SRT files"
HOMEPAGE="https://github.com/cdown/srt"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
2022-03-07 12:50:36 +01:00
LICENSE="MIT"
2021-07-26 10:51:12 +02:00
SLOT="0"
KEYWORDS="~amd64"
2021-07-27 11:05:17 +02:00
distutils_enable_tests pytest
DEPEND="
test? (
dev-python/hypothesis[${PYTHON_USEDEP}]
)
2022-03-07 12:50:36 +01:00
"
2021-07-27 11:05:17 +02:00
2021-07-26 10:51:12 +02:00
src_prepare() {
default
mv "${S}"/srt_tools/srt "${S}"/srt_tools/srt-cdown || die "Cannot rename the file"
sed -e 's|"srt_tools/srt"|"srt_tools/srt-cdown"|' \
-i "${S}"/setup.py || die "Cannot update setup.py"
}
pkg_postinst() {
ewarn "To avoid conflict with dev-python/pysrt::gentoo the binary has been"
ewarn "renamed /usr/bin/srt-cdown. The python module is still called srt."
}