# 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.7.0[${PYTHON_USEDEP}] ~dev-python/attrs-21.2.0[${PYTHON_USEDEP}] ~dev-python/babelfish-0.5.5[${PYTHON_USEDEP}] ~dev-python/beautifulsoup-4.9.3:4[${PYTHON_USEDEP}] ~dev-python/certifi-10001[${PYTHON_USEDEP}] ~dev-python/chardet-4.0.0[${PYTHON_USEDEP}] ~dev-python/charset_normalizer-2.0.4[${PYTHON_USEDEP}] ~dev-python/cheroot-8.5.2[${PYTHON_USEDEP}] ~dev-python/cherrypy-18.6.1[${PYTHON_USEDEP}] ~dev-python/click-7.1.2[${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-1.1.4[${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.0[${PYTHON_USEDEP}] ~dev-python/greenlet-1.0.0[${PYTHON_USEDEP}] ~dev-python/guessit-3.3.1[${PYTHON_USEDEP}] ~dev-python/html5lib-1.1[${PYTHON_USEDEP}] ~dev-python/idna-3.2[${PYTHON_USEDEP}] ~dev-python/immutables-0.15[${PYTHON_USEDEP}] ~dev-python/importlib_metadata-4.6.4[${PYTHON_USEDEP}] ~dev-python/itsdangerous-1.1.0[${PYTHON_USEDEP}] ~dev-python/jaraco-classes-3.2.1[${PYTHON_USEDEP}] ~dev-python/jaraco-collections-3.3.0[${PYTHON_USEDEP}] ~dev-python/jaraco-functools-3.3.0[${PYTHON_USEDEP}] ~dev-python/jaraco-text-3.5.1[${PYTHON_USEDEP}] ~dev-python/jinja-2.11.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.8.0[${PYTHON_USEDEP}] ~dev-python/plumbum-1.7.0[${PYTHON_USEDEP}] ~dev-python/portend-2.7.1[${PYTHON_USEDEP}] ~dev-python/progressbar-2.5[${PYTHON_USEDEP}] ~dev-python/psutil-5.8.0[${PYTHON_USEDEP}] ~dev-python/pynzb-0.1.0[${PYTHON_USEDEP}] ~dev-python/pyparsing-2.4.7[${PYTHON_USEDEP}] ~dev-python/pyrsistent-0.17.3[${PYTHON_USEDEP}] ~dev-python/PyRSS2Gen-1.1[${PYTHON_USEDEP}] ~dev-python/python-dateutil-2.8.2[${PYTHON_USEDEP}] ~dev-python/pytz-2021.1[${PYTHON_USEDEP}] ~dev-python/pyyaml-5.4.1[${PYTHON_USEDEP}] ~dev-python/rebulk-3.0.1[${PYTHON_USEDEP}] ~dev-python/requests-2.26.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.22[${PYTHON_USEDEP}] ~dev-python/tempora-4.1.1[${PYTHON_USEDEP}] ~dev-python/terminaltables-3.1.0[${PYTHON_USEDEP}] ~dev-python/typing-extensions-3.10.0.0[${PYTHON_USEDEP}] ~dev-python/tzlocal-2.1[${PYTHON_USEDEP}] ~dev-python/urllib3-1.26.6[${PYTHON_USEDEP}] ~dev-python/webencodings-0.5.1[${PYTHON_USEDEP}] ~dev-python/werkzeug-1.0.1[${PYTHON_USEDEP}] ~dev-python/zc-lockfile-2.0[${PYTHON_USEDEP}] ~dev-python/zipp-3.5.0[${PYTHON_USEDEP}] ~dev-python/zxcvbn-4.4.28[${PYTHON_USEDEP}] $(python_gen_cond_dep '~dev-python/importlib_resources-5.2.2[${PYTHON_USEDEP}]' python3_8) " 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 "/^aiocontextvars==0.2.2/d" ${S}/requirements.txt || die #sed -i -e "s/^aniso8601==1.2.1/aniso8601==8.0.0/" ${S}/requirements.txt || die #sed -i -e "s/^apscheduler==3.5.0/apscheduler==3.6.3/" ${S}/requirements.txt || die sed -i -e "s/^attrs==20.3.0/attrs==21.2.0/" ${S}/requirements.txt || die #sed -i -e "s/^beautifulsoup4==4.8.2/beautifulsoup4==4.9.3/" ${S}/requirements.txt || die sed -i -e "s/^certifi==2020.12.5/certifi==10001/" ${S}/requirements.txt || die #sed -i -e "s/^chardet==3.0.3/chardet==4.0.0/" ${S}/requirements.txt || die sed -i -e "s/^charset-normalizer==2.0.3/charset-normalizer==2.0.4/" ${S}/requirements.txt || die #sed -i -e "s/^cheroot==8.2.1/cheroot==8.5.2/" ${S}/requirements.txt || die #sed -i -e "s/^cherrypy==18.4.0/cherrypy==18.6.0/" ${S}/requirements.txt || die #sed -i -e "s/^click==6.7/click==7.1.2/" ${S}/requirements.txt || die sed -i -e "/^contextvars==2.4/d" ${S}/requirements.txt || die sed -i -e "s/^flask==1.1.2/flask==1.1.4/" ${S}/requirements.txt || die #sed -i -e "s/^flask-compress==1.4.0/flask-compress==1.8.0/" ${S}/requirements.txt || die #sed -i -e "s/^flask-cors==3.0.2/flask-cors==3.0.10/" ${S}/requirements.txt || die #sed -i -e "s/^flask-login==0.4.0/flask-login==0.5.0/" ${S}/requirements.txt || die #sed -i -e "s/^flask-restful==0.3.6/flask-restful==0.3.8/" ${S}/requirements.txt || die #sed -i -e "s/^future==0.16.0/future==0.17.1/" ${S}/requirements.txt || die sed -i -e "s/^guessit==3.2.0/guessit==3.3.1/" ${S}/requirements.txt || die #sed -i -e "s/^html5lib==0.999999999/html5lib==1.1/" ${S}/requirements.txt || die sed -i -e "s/^idna==2.10/idna==3.2/" ${S}/requirements.txt || die sed -i -e "s/^importlib-metadata==4.6.3/importlib-metadata==4.6.4/" ${S}/requirements.txt || die sed -i -e "/^importlib-resources==5.2.2/d" ${S}/requirements.txt || die #sed -i -e "s/^itsdangerous==0.24/itsdangerous==1.1.0/" ${S}/requirements.txt || die #sed -i -e "s/^jaraco.functools==2.0/jaraco.functools==3.1.0/" ${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/^jinja2==3.0.1/jinja2==2.11.3/" ${S}/requirements.txt || die #sed -i -e "s/^jsonschema==2.6.0/jsonschema==3.2.0/" ${S}/requirements.txt || die sed -i -e "s/^markupsafe==2.0.0/markupsafe==2.0.1/" ${S}/requirements.txt || die #sed -i -e "s/^more-itertools==7.2.0/more-itertools==8.6.0/" ${S}/requirements.txt || die #sed -i -e "s/^path.py==11.5.0/path.py==11.0.1/" ${S}/requirements.txt || die #sed -i -e "s/^pillow==7.0.0/pillow==7.1.2/" ${S}/requirements.txt || die #sed -i -e "s/^plumbum==1.6.3/plumbum==1.6.9/" ${S}/requirements.txt || die #sed -i -e "s/^portend==2.6/portend==2.7.0/" ${S}/requirements.txt || die #sed -i -e "s/^progressbar==2.5/progressbar==2.3/" ${S}/requirements.txt || die #sed -i -e "s/^psutil==5.8.0/psutil==5.7.3/" ${S}/requirements.txt || die #sed -i -e "s/^python-dateutil==2.6.1/python-dateutil==2.8.1/" ${S}/requirements.txt || die #sed -i -e "s/^pytz==2017.2/pytz==2020.5/" ${S}/requirements.txt || die #sed -i -e "s/^pyparsing==2.2.0/pyparsing==2.4.7/" ${S}/requirements.txt || die #sed -i -e "s/^pyyaml==5.1.2/pyyaml==5.3.1/" ${S}/requirements.txt || die #sed -i -e "s/^rebulk==2.0.0/rebulk==3.0.1/" ${S}/requirements.txt || die #sed -i -e "s/^requests==2.24.0/requests==2.25.1/" ${S}/requirements.txt || die #sed -i -e "s/^rpyc==4.1.5/rpyc==5.0.1/" ${S}/requirements.txt || die sed -i -e "s/^six==1.15.0/six==1.16.0/" ${S}/requirements.txt || die #sed -i -e "s/^soupsieve==2.2/soupsieve==2.2.1/" ${S}/requirements.txt || die sed -i -e "s/^sqlalchemy==1.4.20/sqlalchemy==1.4.22/" ${S}/requirements.txt || die sed -i -e "s/^tempora==4.0.2/tempora==4.1.1/" ${S}/requirements.txt || die #sed -i -e "s/^tzlocal==1.4/tzlocal==2.1/" ${S}/requirements.txt || die sed -i -e "s/^urllib3==1.26.4/urllib3==1.26.6/" ${S}/requirements.txt || die #sed -i -e "s/^werkzeug==0.15.6/werkzeug==1.0.1/" ${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 }