1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7,8} )
7 PYTHON_REQ_USE="sqlite(+)"
9 inherit desktop distutils-r1 virtualx
11 DESCRIPTION="Clean junk to free disk space and to maintain privacy"
12 HOMEPAGE="https://www.bleachbit.org"
13 SRC_URI="https://download.bleachbit.org/${P}.tar.bz2"
20 dev-python/chardet[$PYTHON_USEDEP]
21 dev-python/pygobject:3[$PYTHON_USEDEP]
25 test? ( dev-python/mock[${PYTHON_USEDEP}] )
28 distutils_enable_tests unittest
30 # tests fail under FEATURES=usersandbox
33 python_prepare_all() {
35 # avoid tests requiring internet access
36 rm tests/Test{Chaff,Update}.py || die
38 # fails due to non-existent $HOME/.profile
39 rm tests/TestInit.py || die
41 # fails on upstream Travis CI as well as on Gentoo
42 sed -e "s/test_get_proc_swaps(self)/_&/" \
43 -i tests/TestMemory.py || die
46 distutils-r1_python_prepare_all
49 python_compile_all() {
58 distutils-r1_python_install
59 python_newscript ${PN}.py ${PN}
62 python_install_all() {
63 distutils-r1_python_install_all
64 emake -C po DESTDIR="${D}" install
66 insinto /usr/share/bleachbit/cleaners
69 insinto /usr/share/bleachbit
70 doins data/app-menu.ui
73 domenu org.${PN}.BleachBit.desktop