From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E0BAD138334 for ; Wed, 20 Jun 2018 21:45:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1575CE0B4C; Wed, 20 Jun 2018 21:45:28 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BE81FE0B4A for ; Wed, 20 Jun 2018 21:45:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9B32B335C92 for ; Wed, 20 Jun 2018 21:45:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C847A2E1 for ; Wed, 20 Jun 2018 21:45:23 +0000 (UTC) From: "Louis Sautier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Louis Sautier" Message-ID: <1529531107.9d7a8fb9abca501eafe9a811f54cbb00fe1d4019.sbraz@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/python-ldap/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/python-ldap/python-ldap-9999.ebuild X-VCS-Directories: dev-python/python-ldap/ X-VCS-Committer: sbraz X-VCS-Committer-Name: Louis Sautier X-VCS-Revision: 9d7a8fb9abca501eafe9a811f54cbb00fe1d4019 X-VCS-Branch: master Date: Wed, 20 Jun 2018 21:45:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 150b11f6-2921-42de-8d39-e61361916cb7 X-Archives-Hash: 085f77dd3faab5a289f48074fcf14718 commit: 9d7a8fb9abca501eafe9a811f54cbb00fe1d4019 Author: Louis Sautier gentoo org> AuthorDate: Wed Jun 20 21:40:16 2018 +0000 Commit: Louis Sautier gentoo org> CommitDate: Wed Jun 20 21:45:07 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d7a8fb9 dev-python/python-ldap: sync live ebuild with 3.1.0 Use the official upstream instead of the fork. Package-Manager: Portage-2.3.40, Repoman-2.3.9 dev-python/python-ldap/python-ldap-9999.ebuild | 97 +++++++++++++++----------- 1 file changed, 56 insertions(+), 41 deletions(-) diff --git a/dev-python/python-ldap/python-ldap-9999.ebuild b/dev-python/python-ldap/python-ldap-9999.ebuild index ee6ebf08e0e..6fda6295121 100644 --- a/dev-python/python-ldap/python-ldap-9999.ebuild +++ b/dev-python/python-ldap/python-ldap-9999.ebuild @@ -1,9 +1,9 @@ # Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -PYTHON_COMPAT=( python2_7 pypy ) +PYTHON_COMPAT=( pypy{,3} python{2_7,3_{4,5,6}} ) inherit distutils-r1 @@ -11,7 +11,7 @@ DESCRIPTION="Various LDAP-related Python modules" HOMEPAGE="https://www.python-ldap.org/en/latest/ https://pypi.org/project/python-ldap/" if [[ ${PV} == *9999* ]]; then - EGIT_REPO_URI="https://github.com/xmw/python-ldap.git" + EGIT_REPO_URI="https://github.com/python-ldap/python-ldap.git" inherit git-r3 else SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" @@ -20,61 +20,76 @@ fi LICENSE="PSF-2" SLOT="0" -IUSE="doc examples sasl ssl" - -# If you need support for openldap-2.3.x, please use python-ldap-2.3.9. -# python team: Please do not remove python-ldap-2.3.9 from the tree. -RDEPEND=">=net-nds/openldap-2.4 - dev-python/pyasn1[${PYTHON_USEDEP}] - sasl? ( >=dev-libs/cyrus-sasl-2.1 )" -DEPEND="${RDEPEND} +IUSE="doc examples sasl ssl test" + +# We do not need OpenSSL, it is never directly used: +# https://github.com/python-ldap/python-ldap/issues/224 +RDEPEND=" + !dev-python/pyldap + >=dev-python/pyasn1-0.3.7[${PYTHON_USEDEP}] + >=dev-python/pyasn1-modules-0.1.5[${PYTHON_USEDEP}] + >net-nds/openldap-2.4.11:=[sasl?,ssl?] +" +# We do not link against cyrus-sasl but we use some +# of its headers during the build. +DEPEND=" + >net-nds/openldap-2.4.11:=[sasl?,ssl?] dev-python/setuptools[${PYTHON_USEDEP}] - doc? ( - dev-python/sphinx[${PYTHON_USEDEP}] - dev-python/pyasn1-modules[${PYTHON_USEDEP}] + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + sasl? ( >=dev-libs/cyrus-sasl-2.1 ) + test? ( + ${RDEPEND} + dev-python/pytest[${PYTHON_USEDEP}] ) " -RDEPEND+=" !dev-python/pyldap" python_prepare_all() { - sed -e "s:^library_dirs =.*:library_dirs = /usr/$(get_libdir) /usr/$(get_libdir)/sasl2:" \ - -e "s:^include_dirs =.*:include_dirs = ${EPREFIX}/usr/include ${EPREFIX}/usr/include/sasl:" \ - -i setup.cfg || die "error fixing setup.cfg" - - local mylibs="ldap" - if use sasl; then - use ssl && mylibs="ldap_r" - mylibs="${mylibs} sasl2" - else - sed -e 's/HAVE_SASL//g' -i setup.cfg || die + # The live ebuild won't compile if setuptools_scm < 1.16.2 is installed + # https://github.com/pypa/setuptools_scm/issues/228 + if [[ ${PV} == *9999* ]]; then + rm -r .git || die fi - use ssl && mylibs="${mylibs} ssl crypto" - use elibc_glibc && mylibs="${mylibs} resolv" - sed -e "s:^libs = .*:libs = lber ${mylibs}:" \ - -i setup.cfg || die "error setting up libs in setup.cfg" - - # set test expected to fail to expectedFailure - sed -e "s:^ def test_bad_urls: @unittest.expectedFailure\n def test_bad_urls:" \ - -i Tests/t_ldapurl.py || die + if ! use sasl; then + sed -i 's/HAVE_SASL//g' setup.cfg || die + fi + if ! use ssl; then + sed -i 's/HAVE_TLS//g' setup.cfg || die + fi distutils-r1_python_prepare_all } python_compile_all() { - use doc && emake -C Doc html + if use doc; then + sphinx-build Doc Doc/_build/html || die + HTML_DOCS=( Doc/_build/html/. ) + fi } python_test() { - # XXX: the tests supposedly can start local slapd - # but it requires some manual config, it seems. - - "${PYTHON}" Tests/t_ldapurl.py || die "Tests fail with ${EPYTHON}" + # Run all tests which don't require slapd + local ignored_tests=( + t_bind.py + t_cext.py + t_edit.py + t_ldapobject.py + t_ldap_options.py + t_ldap_sasl.py + t_ldap_schema_subentry.py + t_ldap_syncrepl.py + t_slapdobject.py + ) + cd Tests || die + py.test ${ignored_tests[@]/#/--ignore } \ + || die "tests failed with ${EPYTHON}" } python_install_all() { - use examples && local EXAMPLES=( Demo/. ) - use doc && local HTML_DOCS=( Doc/.build/html/. ) - + if use examples; then + docinto examples + dodoc -r Demo/. + docompress -x /usr/share/doc/${PF}/examples + fi distutils-r1_python_install_all }