# Copyright 2024-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{12..13} ) inherit optfeature distutils-r1 DESCRIPTION="Bugtracker to taskwarrior importer" HOMEPAGE="https://pypi.org/project/bugwarrior/ https://github.com/GothenburgBitFactory/bugwarrior" if [[ "${PV}" == "9999" ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/GothenburgBitFactory/bugwarrior.git" EGIT_BRANCH="develop" else SRC_URI=" https://github.com/GothenburgBitFactory/bugwarrior/archive/${PV}.tar.gz -> ${P}.gh.tar.gz " KEYWORDS="~amd64" fi LICENSE="GPL-3" SLOT="0" RDEPEND=" dev-python/click[${PYTHON_USEDEP}] dev-python/dogpile-cache[${PYTHON_USEDEP}] dev-python/jinja2[${PYTHON_USEDEP}] dev-python/lockfile[${PYTHON_USEDEP}] dev-python/pydantic[${PYTHON_USEDEP}] dev-python/python-dateutil[${PYTHON_USEDEP}] dev-python/pytz[${PYTHON_USEDEP}] dev-python/requests[${PYTHON_USEDEP}] dev-python/taskw[${PYTHON_USEDEP}] dev-python/tomli[${PYTHON_USEDEP}] " BDEPEND=" test? ( ${RDEPEND} dev-python/docutils[${PYTHON_USEDEP}] dev-python/responses[${PYTHON_USEDEP}] dev-python/pytest-subtests[${PYTHON_USEDEP}] dev-util/ruff dev-python/ini2toml[${PYTHON_USEDEP}] dev-python/python-bugzilla[${PYTHON_USEDEP}] dev-python/keyring[${PYTHON_USEDEP}] ) " distutils_enable_tests pytest DOCS=( bugwarrior/README.rst CHANGELOG.rst ) src_prepare() { # Some modules don't have packaged dependencies local ignore_modules=( "activecollab" "bts" "command" "gmail" "jira" "kanboard" "config/load" "megaplan" "phab" "config/schema" "todoist" "trac" "versionone" ) local m for m in "${ignore_modules[@]}"; do rm "tests/$(dirname "${m}")/test_$(basename "${m}").py" done distutils-r1_src_prepare } pkg_postinst() { optfeature "Bugzilla support" "dev-python/python-bugzilla" optfeature "GMail support" "dev-python/google-api-python-client" "dev-python/google-auth-oauthlib" optfeature "GitLab support" "dev-vcs/python-gitlab" }