1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
7 PYTHON_REQ_USE="threads,ssl,xml"
9 inherit bash-completion-r1 distutils-r1 eutils flag-o-matic versionator
12 SERIES=$(get_version_component_range 1-2)
14 DESCRIPTION="Bazaar is a next generation distributed version control system"
15 HOMEPAGE="http://bazaar-vcs.org/"
16 SRC_URI="https://launchpad.net/bzr/${SERIES}/${PV}/+download/${MY_P}.tar.gz"
20 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris"
21 IUSE="curl doc +sftp test"
23 RDEPEND="curl? ( dev-python/pycurl[${PYTHON_USEDEP}] )
24 sftp? ( dev-python/paramiko[${PYTHON_USEDEP}] )"
28 >=dev-python/pyftpdlib-0.7.0[${PYTHON_USEDEP}]
30 >=dev-python/testtools-0.9.5[${PYTHON_USEDEP}]
33 S="${WORKDIR}/${MY_P}"
35 # Fails tests bug#487216
36 # Upstream is not exactly keen on fixing it
39 python_configure_all() {
40 # Generate the locales first to avoid a race condition.
45 if [[ ${EPYTHON} != python3* ]]; then
46 local CFLAGS=${CFLAGS}
47 append-cflags -fno-strict-aliasing
49 distutils-r1_python_compile
53 # Race due to conflicting ports in
54 # blackbox.test_serve.TestBzrServe.test_bzr_serve*.
55 DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test
59 # Some tests expect the usual pyc compiling behaviour.
60 local -x PYTHONDONTWRITEBYTECODE
62 # Define tests which are known to fail below.
64 # https://bugs.launchpad.net/bzr/+bug/850676
65 skip_tests+="per_transport.TransportTests.test_unicode_paths.*"
67 if [[ -n ${skip_tests} ]]; then
68 einfo "Skipping tests known to fail: ${skip_tests}"
71 LC_ALL="C" "${PYTHON}" bzr --no-plugins selftest -v \
72 ${skip_tests:+-x} "${skip_tests}" || die "Tests fail with ${EPYTHON}"
75 python_install_all() {
76 distutils-r1_python_install_all
78 # Fixup manpages manually; passing --install-data causes locales to be
79 # installed in /usr/share/share/locale
81 mv "${ED%/}"/usr/{man,share/man} || die
87 dodoc -r doc/developers/* || die
88 for doc in mini-tutorial tutorials user-{guide,reference}; do
90 dodoc -r doc/en/${doc}/* || die
94 dobashcomp contrib/bash/bzr || die