blob: 36045802f8473b49d242147783968a619c40d4a9 [file] [log] [blame]
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python2_7 python3_{6..9} pypy pypy3 )
inherit distutils-r1 bash-completion-r1
MY_P=${P^}
DESCRIPTION="Pygments is a syntax highlighting package written in Python"
HOMEPAGE="
https://pygments.org/
https://github.com/pygments/pygments/
https://pypi.org/project/Pygments/
"
SRC_URI="mirror://pypi/${MY_P:0:1}/${PN^}/${MY_P}.tar.gz"
S=${WORKDIR}/${MY_P}
PATCHES=(
"${FILESDIR}"/CVE-2022-40896-java.patch
"${FILESDIR}"/CVE-2022-40896-sql.patch
)
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="*"
BDEPEND="
test? (
dev-python/lxml[${PYTHON_USEDEP}]
dev-python/pillow[${PYTHON_USEDEP}]
dev-python/wcag-contrast-ratio[${PYTHON_USEDEP}]
virtual/ttf-fonts
)
"
distutils_enable_tests pytest
src_install() {
distutils-r1_src_install
newbashcomp external/pygments.bashcomp pygmentize
}