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.
79 lines
1.7 KiB
79 lines
1.7 KiB
5 years ago
|
# Copyright 1999-2020 Gentoo Authors
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
5 years ago
|
EAPI=7
|
||
13 years ago
|
|
||
5 years ago
|
PYTHON_COMPAT=( python3_6 )
|
||
13 years ago
|
|
||
11 years ago
|
GIT_ECLASS=""
|
||
13 years ago
|
if [[ ${PV} = *9999* ]]; then
|
||
11 years ago
|
GIT_ECLASS="git-r3"
|
||
7 years ago
|
EGIT_REPO_URI="https://github.com/rafaelmartins/blohg"
|
||
13 years ago
|
fi
|
||
|
|
||
10 years ago
|
inherit distutils-r1 ${GIT_ECLASS}
|
||
13 years ago
|
|
||
10 years ago
|
DESCRIPTION="A Mercurial (or Git) based blogging engine"
|
||
7 years ago
|
HOMEPAGE="https://github.com/rafaelmartins/blohg"
|
||
13 years ago
|
|
||
5 years ago
|
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
|
||
|
https://dev.gentoo.org/~rafaelmartins/distfiles/${PN}-patches-${PVR}.tar.xz"
|
||
13 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
13 years ago
|
if [[ ${PV} = *9999* ]]; then
|
||
|
SRC_URI=""
|
||
|
KEYWORDS=""
|
||
|
fi
|
||
13 years ago
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
10 years ago
|
IUSE="doc git +mercurial test"
|
||
5 years ago
|
RESTRICT="!test? ( test )"
|
||
13 years ago
|
|
||
10 years ago
|
REQUIRED_USE="|| ( git mercurial )
|
||
|
test? ( git mercurial )"
|
||
|
|
||
|
RDEPEND="
|
||
5 years ago
|
dev-python/click[${PYTHON_USEDEP}]
|
||
|
dev-python/docutils[${PYTHON_USEDEP}]
|
||
|
dev-python/feedgenerator[${PYTHON_USEDEP}]
|
||
|
dev-python/flask[${PYTHON_USEDEP}]
|
||
|
dev-python/flask-babel[${PYTHON_USEDEP}]
|
||
|
dev-python/frozen-flask[${PYTHON_USEDEP}]
|
||
|
dev-python/jinja[${PYTHON_USEDEP}]
|
||
|
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||
|
dev-python/pygments[${PYTHON_USEDEP}]
|
||
|
git? ( dev-python/pygit2[${PYTHON_USEDEP}] )
|
||
|
mercurial? ( >=dev-vcs/mercurial-5.2[${PYTHON_USEDEP}] )"
|
||
11 years ago
|
|
||
|
DEPEND="${RDEPEND}
|
||
5 years ago
|
doc? ( dev-python/sphinx )"
|
||
13 years ago
|
|
||
10 years ago
|
python_prepare_all() {
|
||
5 years ago
|
if [[ ${PV} != *9999* ]]; then
|
||
|
eapply "${WORKDIR}/${PN}-patches-${PVR}"
|
||
|
fi
|
||
|
|
||
10 years ago
|
if ! use git; then
|
||
|
rm -rf blohg/vcs_backends/git || die 'rm failed'
|
||
|
fi
|
||
13 years ago
|
|
||
10 years ago
|
if ! use mercurial; then
|
||
|
rm -rf blohg/vcs_backends/hg || die 'rm failed'
|
||
13 years ago
|
fi
|
||
10 years ago
|
|
||
|
distutils-r1_python_prepare_all
|
||
|
}
|
||
|
|
||
|
python_compile_all() {
|
||
|
use doc && emake -C docs html
|
||
13 years ago
|
}
|
||
|
|
||
10 years ago
|
python_install_all() {
|
||
|
use doc && HTML_DOCS=( docs/_build/html/. )
|
||
|
distutils-r1_python_install_all
|
||
|
}
|
||
13 years ago
|
|
||
10 years ago
|
python_test() {
|
||
|
esetup.py test
|
||
13 years ago
|
}
|