# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=7 PYTHON_COMPAT=( python3_{8,9} ) inherit distutils-r1 eutils systemd user if [[ ${PV} != 9999 ]]; then MY_P="FlexGet-${PV}" SRC_URI="mirror://pypi/F/FlexGet/${MY_P}.tar.gz" KEYWORDS="~amd64 ~x86" else inherit git-r3 EGIT_REPO_URI="git://github.com/Flexget/Flexget.git https://github.com/Flexget/Flexget.git" fi DESCRIPTION="Multipurpose automation tool for content like torrents, nzbs, podcasts, comics" HOMEPAGE="http://flexget.com/" LICENSE="MIT" SLOT="0" IUSE="systemd test transmission" RESTRICT="nomirror" DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] ~dev-python/aniso8601-9.0.1[${PYTHON_USEDEP}] ~dev-python/APScheduler-3.8.1[${PYTHON_USEDEP}] ~dev-python/attrs-21.2.0[${PYTHON_USEDEP}] ~dev-python/babelfish-0.6.0[${PYTHON_USEDEP}] ~dev-python/beautifulsoup4-4.10.0[${PYTHON_USEDEP}] ~dev-python/certifi-10001[${PYTHON_USEDEP}] ~dev-python/chardet-4.0.0[${PYTHON_USEDEP}] ~dev-python/charset_normalizer-2.0.10[${PYTHON_USEDEP}] ~dev-python/cheroot-8.5.2[${PYTHON_USEDEP}] ~dev-python/cherrypy-18.6.1[${PYTHON_USEDEP}] ~dev-python/click-8.0.3[${PYTHON_USEDEP}] ~dev-python/colorama-0.4.4[${PYTHON_USEDEP}] ~dev-python/colorclass-2.2.0[${PYTHON_USEDEP}] ~dev-python/feedparser-6.0.8[${PYTHON_USEDEP}] ~dev-python/flask-2.0.2[${PYTHON_USEDEP}] ~dev-python/flask-compress-1.10.1[${PYTHON_USEDEP}] ~dev-python/flask-cors-3.0.10[${PYTHON_USEDEP}] ~dev-python/flask-login-0.5.0[${PYTHON_USEDEP}] ~dev-python/flask-restful-0.3.9[${PYTHON_USEDEP}] ~dev-python/flask-restx-0.5.1[${PYTHON_USEDEP}] ~dev-python/greenlet-1.1.2[${PYTHON_USEDEP}] ~dev-python/guessit-3.4.2[${PYTHON_USEDEP}] ~dev-python/html5lib-1.1[${PYTHON_USEDEP}] ~dev-python/idna-3.3[${PYTHON_USEDEP}] ~dev-python/importlib_metadata-4.8.1[${PYTHON_USEDEP}] ~dev-python/itsdangerous-2.0.1[${PYTHON_USEDEP}] ~dev-python/jaraco-classes-3.2.1[${PYTHON_USEDEP}] ~dev-python/jaraco-collections-3.4.0[${PYTHON_USEDEP}] ~dev-python/jaraco-functools-3.3.0[${PYTHON_USEDEP}] ~dev-python/jaraco-text-3.5.1[${PYTHON_USEDEP}] ~dev-python/jinja-3.0.3[${PYTHON_USEDEP}] ~dev-python/jsonschema-3.2.0[${PYTHON_USEDEP}] ~dev-python/loguru-0.5.3[${PYTHON_USEDEP}] ~dev-python/markupsafe-2.0.1[${PYTHON_USEDEP}] ~dev-python/more-itertools-8.12.0[${PYTHON_USEDEP}] ~dev-python/plumbum-1.7.0[${PYTHON_USEDEP}] ~dev-python/portend-3.0.0[${PYTHON_USEDEP}] ~dev-python/psutil-5.8.0[${PYTHON_USEDEP}] ~dev-python/pygments-2.10.0[${PYTHON_USEDEP}] ~dev-python/pynzb-0.1.0[${PYTHON_USEDEP}] ~dev-python/pyparsing-3.0.6[${PYTHON_USEDEP}] ~dev-python/pyrsistent-0.18.0[${PYTHON_USEDEP}] ~dev-python/PyRSS2Gen-1.1[${PYTHON_USEDEP}] ~dev-python/python-dateutil-2.8.2[${PYTHON_USEDEP}] ~dev-python/pytz-2021.3[${PYTHON_USEDEP}] ~dev-python/pyyaml-6.0[${PYTHON_USEDEP}] ~dev-python/rebulk-3.1.0[${PYTHON_USEDEP}] ~dev-python/requests-2.27.1[${PYTHON_USEDEP}] ~dev-python/rich-11.0.0[${PYTHON_USEDEP}] ~dev-python/rpyc-5.0.1[${PYTHON_USEDEP}] ~dev-python/sgmllib3k-1.0.0[${PYTHON_USEDEP}] ~dev-python/six-1.16.0[${PYTHON_USEDEP}] ~dev-python/soupsieve-2.2.1[${PYTHON_USEDEP}] ~dev-python/sqlalchemy-1.4.29[${PYTHON_USEDEP}] ~dev-python/tempora-4.1.2[${PYTHON_USEDEP}] ~dev-python/typing-extensions-3.10.0.2[${PYTHON_USEDEP}] ~dev-python/tzlocal-4.0.2[${PYTHON_USEDEP}] ~dev-python/urllib3-1.26.8[${PYTHON_USEDEP}] ~dev-python/webencodings-0.5.1[${PYTHON_USEDEP}] ~dev-python/werkzeug-2.0.2[${PYTHON_USEDEP}] ~dev-python/zc-lockfile-2.0[${PYTHON_USEDEP}] ~dev-python/zipp-3.6.0[${PYTHON_USEDEP}] ~dev-python/zxcvbn-4.4.28[${PYTHON_USEDEP}] " RDEPEND="${DEPEND} transmission? ( dev-python/transmissionrpc[${PYTHON_USEDEP}] ) " DEPEND+=" test? ( dev-python/nose[${PYTHON_USEDEP}] )" if [[ ${PV} == 9999 ]]; then DEPEND+=" dev-python/paver[${PYTHON_USEDEP}]" else S="${WORKDIR}/${MY_P}" fi python_test() { cp -lr tests setup.cfg "${BUILD_DIR}" || die run_in_build_dir nosetests -v --attr=!online > "${T}/tests-${EPYTHON}.log" \ || die "Tests fail with ${EPYTHON}" } pkg_setup() { enewgroup ${PN} enewuser ${PN} -1 -1 ${PN} } src_prepare() { distutils-r1_src_prepare sed -i -e "s/^apscheduler==3.8.0/apscheduler==3.8.1/" ${S}/requirements.txt || die sed -i -e "s/^certifi==2021.10.8/certifi==10001/" ${S}/requirements.txt || die sed -i -e "s/^charset-normalizer==2.0.7/charset-normalizer==2.0.10/" ${S}/requirements.txt || die sed -i -e "s/^guessit==3.4.3/guessit==3.4.2/" ${S}/requirements.txt || die sed -i -e "s/^jaraco.text==3.5.0/jaraco.text==3.5.1/" ${S}/requirements.txt || die sed -i -e "s/^pyparsing==2.4.7/pyparsing==3.0.6/" ${S}/requirements.txt || die sed -i -e "s/^requests==2.26.0/requests==2.27.1/" ${S}/requirements.txt || die sed -i -e "s/^rich==10.15.0/rich==11.0.0/" ${S}/requirements.txt || die sed -i -e "s/^sqlalchemy==1.4.27/sqlalchemy==1.4.29/" ${S}/requirements.txt || die sed -i -e "s/^tzlocal==2.1/tzlocal==4.0.2/" ${S}/requirements.txt || die sed -i -e "s/^urllib3==1.26.7/urllib3==1.26.8/" ${S}/requirements.txt || die sed -i -e "s/^zxcvbn-python==4.4.24/zxcvbn==4.4.28/" ${S}/requirements.txt || die } src_install() { distutils-r1_src_install keepdir /var/log/${PN} fowners ${PN}:${PN} /var/log/${PN} fperms 755 /var/log/${PN} if use systemd; then systemd_dounit "${FILESDIR}"/flexget.service fi }