1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
6 PYTHON_REQ_USE="threads,ssl,xml"
8 inherit bash-completion-r1 distutils-r1 eutils flag-o-matic versionator
11 SERIES=$(get_version_component_range 1-2)
13 DESCRIPTION="Bazaar is a next generation distributed version control system"
14 HOMEPAGE="http://bazaar-vcs.org/"
15 #SRC_URI="http://bazaar-vcs.org/releases/src/${MY_P}.tar.gz"
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 ~amd64-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}"
36 "${FILESDIR}/${PN}-2.4.2-no-pyrex-citon.patch"
37 "${FILESDIR}/${P}-sphinx-test-failures.patch"
40 python_configure_all() {
41 # Generate the locales first to avoid a race condition.
46 if [[ ${EPYTHON} != python3* ]]; then
47 local CFLAGS=${CFLAGS}
48 append-cflags -fno-strict-aliasing
50 distutils-r1_python_compile
54 # Some tests expect the usual pyc compiling behaviour.
55 local -x PYTHONDONTWRITEBYTECODE
57 # Define tests which are known to fail below.
59 # https://bugs.launchpad.net/bzr/+bug/850676
60 skip_tests+="per_transport.TransportTests.test_unicode_paths.*"
62 if [[ -n ${skip_tests} ]]; then
63 einfo "Skipping tests known to fail: ${skip_tests}"
66 LC_ALL="C" "${PYTHON}" bzr --no-plugins selftest -v \
67 ${skip_tests:+-x} "${skip_tests}" || die "Tests fail with ${EPYTHON}"
70 python_install_all() {
71 distutils-r1_python_install_all
73 # Fixup manpages manually; passing --install-data causes locales to be
74 # installed in /usr/share/share/locale
76 mv "${ED%/}"/usr/{man,share/man} || die
82 dodoc -r doc/developers/* || die
83 for doc in mini-tutorial tutorials user-{guide,reference}; do
85 dodoc -r doc/en/${doc}/* || die
89 dobashcomp contrib/bash/bzr || die