You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
2.0 KiB
102 lines
2.0 KiB
1 month ago
|
# Copyright 1999-2024 Gentoo Authors
|
||
2 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=8
|
||
|
|
||
|
DISTUTILS_SINGLE_IMPL=ON
|
||
|
DISTUTILS_USE_PEP517=setuptools
|
||
1 month ago
|
PYTHON_COMPAT=( python3_{10..12} )
|
||
2 years ago
|
|
||
|
inherit distutils-r1 elisp
|
||
|
|
||
|
DESCRIPTION="Emacs Python Development Environment"
|
||
|
HOMEPAGE="https://github.com/jorgenschaefer/elpy/"
|
||
1 month ago
|
|
||
|
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
|
||
2 years ago
|
|
||
|
LICENSE="GPL-3+"
|
||
|
SLOT="0"
|
||
|
IUSE="test"
|
||
|
RESTRICT="!test? ( test )"
|
||
|
|
||
|
RDEPEND="
|
||
|
app-emacs/company-mode
|
||
|
app-emacs/highlight-indentation
|
||
|
app-emacs/pyvenv
|
||
|
app-emacs/s
|
||
|
app-emacs/yasnippet
|
||
1 month ago
|
$(python_gen_cond_dep '
|
||
|
dev-python/flake8[${PYTHON_USEDEP}]
|
||
|
')
|
||
2 years ago
|
"
|
||
|
BDEPEND="
|
||
|
${RDEPEND}
|
||
|
test? (
|
||
|
$(python_gen_cond_dep '
|
||
|
dev-python/autopep8[${PYTHON_USEDEP}]
|
||
|
dev-python/jedi[${PYTHON_USEDEP}]
|
||
|
dev-python/yapf[${PYTHON_USEDEP}]
|
||
|
')
|
||
|
)
|
||
|
"
|
||
|
|
||
1 month ago
|
ELISP_REMOVE="
|
||
|
elpy/tests/test_black.py
|
||
|
elpy/tests/test_yapf.py
|
||
|
"
|
||
2 years ago
|
PATCHES=(
|
||
1 month ago
|
"${FILESDIR}/${PN}-elpy.el-yas-snippet-dirs.patch"
|
||
|
"${FILESDIR}/${PN}-elpy-rpc.el-elpy-rpc-pythonpath.patch"
|
||
2 years ago
|
)
|
||
1 year ago
|
|
||
|
DOCS=( CONTRIBUTING.rst README.rst )
|
||
2 years ago
|
SITEFILE="50${PN}-gentoo.el"
|
||
|
|
||
|
distutils_enable_sphinx docs --no-autodoc
|
||
|
distutils_enable_tests unittest
|
||
|
|
||
|
pkg_setup() {
|
||
|
elisp_pkg_setup
|
||
|
python-single-r1_pkg_setup
|
||
|
}
|
||
|
|
||
|
src_prepare() {
|
||
|
distutils-r1_src_prepare
|
||
|
|
||
1 month ago
|
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
|
||
2 years ago
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
distutils-r1_src_compile
|
||
|
elisp_src_compile
|
||
|
}
|
||
|
|
||
|
src_test() {
|
||
|
distutils-r1_src_test
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
distutils-r1_src_install
|
||
|
|
||
|
elisp_src_install
|
||
1 month ago
|
insinto "${SITEETC}/${PN}"
|
||
2 years ago
|
doins -r snippets
|
||
|
}
|