bzr-2.7.1_pre.ebuild (2661B)
1 # Copyright 1999-2020 Gentoo Authors 2 # Distributed under the terms of the GNU General Public License v2 3 4 EAPI=6 5 PYTHON_COMPAT=( python2_7 ) 6 PYTHON_REQ_USE="threads,ssl,xml" 7 8 DESCRIPTION="Bazaar is a next generation distributed version control system" 9 HOMEPAGE="http://bazaar-vcs.org/" 10 11 LICENSE="GPL-2" 12 SLOT="0" 13 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris" 14 IUSE="curl doc +sftp test" 15 PLOCALES="ar ast bs ca cs de el en_AU en_GB es fa fo fr gl he id it ja ko ms my nb nl oc pl pt_BR ro ru sco si sk sr sv tr ug uk vi zh_CN" 16 17 inherit bash-completion-r1 distutils-r1 flag-o-matic l10n 18 #SERIES=$(get_version_component_range 1-2) 19 SRC_URI="https://dev.gentoo.org/~grozin/${P}.tar.gz" 20 21 RDEPEND="curl? ( || ( dev-python/pycurl-py2[${PYTHON_USEDEP}] dev-python/pycurl[${PYTHON_USEDEP}] ) ) 22 sftp? ( || ( dev-python/paramiko-py2[${PYTHON_USEDEP}] dev-python/paramiko[${PYTHON_USEDEP}] ) )" 23 24 DEPEND="|| ( dev-python/cython[${PYTHON_USEDEP}] dev-python/pyrex[${PYTHON_USEDEP}] ) 25 test? ( ${RDEPEND} 26 >=dev-python/pyftpdlib-0.7.0[${PYTHON_USEDEP}] 27 dev-python/subunit 28 >=dev-python/testtools-0.9.5[${PYTHON_USEDEP}] )" 29 30 # Fails tests bug#487216 31 # Upstream is not exactly keen on fixing it 32 RESTRICT="test" 33 34 python_configure_all() { 35 rm_loc() { 36 rm "${S}"/po/$1.po || die 37 } 38 l10n_for_each_disabled_locale_do rm_loc 39 # Generate the locales first to avoid a race condition. 40 esetup.py build_mo 41 } 42 43 python_compile() { 44 if [[ ${EPYTHON} != python3* ]]; then 45 local CFLAGS=${CFLAGS} 46 append-cflags -fno-strict-aliasing 47 fi 48 distutils-r1_python_compile 49 } 50 51 python_test() { 52 # Some tests expect the usual pyc compiling behaviour. 53 local -x PYTHONDONTWRITEBYTECODE 54 55 # Define tests which are known to fail below. 56 local skip_tests="(" 57 # https://bugs.launchpad.net/bzr/+bug/850676 58 skip_tests+="per_transport.TransportTests.test_unicode_paths.*" 59 skip_tests+=")" 60 if [[ -n ${skip_tests} ]]; then 61 einfo "Skipping tests known to fail: ${skip_tests}" 62 fi 63 64 LC_ALL="C" "${PYTHON}" bzr --no-plugins selftest -v \ 65 ${skip_tests:+-x} "${skip_tests}" || die "Tests fail with ${EPYTHON}" 66 } 67 68 python_install_all() { 69 distutils-r1_python_install_all 70 71 # Fixup manpages manually; passing --install-data causes locales to be 72 # installed in /usr/share/share/locale 73 dodir /usr/share 74 mv "${ED%/}"/usr/{man,share/man} || die 75 76 dodoc doc/*.txt 77 78 if use doc; then 79 docinto developers 80 dodoc -r doc/developers/* 81 for doc in mini-tutorial tutorials user-{guide,reference}; do 82 docinto ${doc} 83 dodoc -r doc/en/${doc}/* 84 done 85 fi 86 87 dobashcomp contrib/bash/bzr || die 88 }