app-emacs/elpy: enable py3.12 compat
Closes: https://bugs.gentoo.org/929303 Closes: https://bugs.gentoo.org/885897 Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
parent
83e926029a
commit
de2d3b0c5f
|
@ -1,25 +1,33 @@
|
|||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
[[ ${PV} == *_p20220627 ]] && COMMIT=de31d30003c515c25ff7bfd3a361c70c298f78bb
|
||||
|
||||
DISTUTILS_SINGLE_IMPL=ON
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{9..11} )
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit distutils-r1 elisp
|
||||
|
||||
DESCRIPTION="Emacs Python Development Environment"
|
||||
HOMEPAGE="https://github.com/jorgenschaefer/elpy/"
|
||||
SRC_URI="https://github.com/jorgenschaefer/${PN}/archive/${COMMIT}.tar.gz
|
||||
-> ${P}.tar.gz"
|
||||
S="${WORKDIR}"/${PN}-${COMMIT}
|
||||
|
||||
if [[ "${PV}" == *9999* ]] ; then
|
||||
inherit git-r3
|
||||
|
||||
EGIT_REPO_URI="https://github.com/jorgenschaefer/${PN}.git"
|
||||
else
|
||||
[[ "${PV}" == *_p20220627 ]] && COMMIT=de31d30003c515c25ff7bfd3a361c70c298f78bb
|
||||
|
||||
SRC_URI="https://github.com/jorgenschaefer/${PN}/archive/${COMMIT}.tar.gz
|
||||
-> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${COMMIT}"
|
||||
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
|
@ -29,7 +37,9 @@ RDEPEND="
|
|||
app-emacs/pyvenv
|
||||
app-emacs/s
|
||||
app-emacs/yasnippet
|
||||
$(python_gen_cond_dep 'dev-python/flake8[${PYTHON_USEDEP}]')
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/flake8[${PYTHON_USEDEP}]
|
||||
')
|
||||
"
|
||||
BDEPEND="
|
||||
${RDEPEND}
|
||||
|
@ -42,9 +52,13 @@ BDEPEND="
|
|||
)
|
||||
"
|
||||
|
||||
ELISP_REMOVE="
|
||||
elpy/tests/test_black.py
|
||||
elpy/tests/test_yapf.py
|
||||
"
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-elpy.el-yas-snippet-dirs.patch
|
||||
"${FILESDIR}"/${PN}-elpy-rpc.el-elpy-rpc-pythonpath.patch
|
||||
"${FILESDIR}/${PN}-elpy.el-yas-snippet-dirs.patch"
|
||||
"${FILESDIR}/${PN}-elpy-rpc.el-elpy-rpc-pythonpath.patch"
|
||||
)
|
||||
|
||||
DOCS=( CONTRIBUTING.rst README.rst )
|
||||
|
@ -60,10 +74,13 @@ pkg_setup() {
|
|||
|
||||
src_prepare() {
|
||||
distutils-r1_src_prepare
|
||||
rm elpy/tests/test_black.py || die
|
||||
|
||||
sed -i "s|@SITEETC@|${EPREFIX}${SITEETC}/${PN}|" ${PN}.el || die
|
||||
sed -i "s|@PYTHONLIB@|${EPREFIX}/usr/lib/${EPYTHON}|" ${PN}-rpc.el || die
|
||||
sed -i "${PN}.el" -e "s|@SITEETC@|${EPREFIX}${SITEETC}/${PN}|" || die
|
||||
sed -i "${PN}-rpc.el" -e "s|@PYTHONLIB@|${EPREFIX}/usr/lib/${EPYTHON}|" || die
|
||||
|
||||
rm ${ELISP_REMOVE} || die
|
||||
sed -i elpy/tests/support.py \
|
||||
-e "s|test_should_get_oneline_docstring_for_modules|disabled_&|" || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
|
@ -79,6 +96,6 @@ src_install() {
|
|||
distutils-r1_src_install
|
||||
|
||||
elisp_src_install
|
||||
insinto ${SITEETC}/${PN}
|
||||
insinto "${SITEETC}/${PN}"
|
||||
doins -r snippets
|
||||
}
|
Loading…
Reference in New Issue