From 5d2eaedb013bfcd3df92046b7027e16cf50a27b7 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Mon, 27 Apr 2020 10:58:32 +0200 Subject: dev-python/brotlipy: Add missing dep on enum34 for py2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/719754 Signed-off-by: Michał Górny --- dev-python/brotlipy/brotlipy-0.7.0-r1.ebuild | 48 -------------------------- dev-python/brotlipy/brotlipy-0.7.0-r2.ebuild | 50 ++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 48 deletions(-) delete mode 100644 dev-python/brotlipy/brotlipy-0.7.0-r1.ebuild create mode 100644 dev-python/brotlipy/brotlipy-0.7.0-r2.ebuild (limited to 'dev-python') diff --git a/dev-python/brotlipy/brotlipy-0.7.0-r1.ebuild b/dev-python/brotlipy/brotlipy-0.7.0-r1.ebuild deleted file mode 100644 index 3f600dc16b68..000000000000 --- a/dev-python/brotlipy/brotlipy-0.7.0-r1.ebuild +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python{2_7,3_6,3_7,3_8} pypy3 ) - -inherit distutils-r1 - -# Commit of the Brotli library bundled within brotlipy. -BROTLI_BUNDLED_COMMIT="46c1a881b41bb638c76247558aa04b1591af3aa7" - -DESCRIPTION="Python binding to the Brotli library" -HOMEPAGE="https://github.com/python-hyper/brotlipy/ https://pypi.python.org/pypi/brotlipy" -SRC_URI=" - https://github.com/python-hyper/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz - https://github.com/google/brotli/archive/${BROTLI_BUNDLED_COMMIT}.tar.gz -> brotli-${BROTLI_BUNDLED_COMMIT}.tar.gz -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 sparc x86" - -# module name collision with app-arch/brotli -RDEPEND="virtual/python-cffi[${PYTHON_USEDEP}] - !app-arch/brotli[python]" -DEPEND=" - test? ( - dev-python/hypothesis[${PYTHON_USEDEP}] - ) -" - -distutils_enable_tests pytest - -PATCHES=( - "${FILESDIR}"/brotlipy-0.7.0-test-deadline.patch -) - -src_prepare() { - # Inject the brotli lib. - rm -r "${WORKDIR}/${P}/libbrotli" || die "Could not remove the bundled brotli lib folder." - cp -r "${WORKDIR}/brotli-${BROTLI_BUNDLED_COMMIT}/" "${WORKDIR}/${P}/libbrotli" || die "Could not inject the brotli lib." - - # Tests fail if we have this folder preserved within the lib. - rm -r "${WORKDIR}/${P}/libbrotli/python" || die "Could not remove 'python' subfolder." - - distutils-r1_src_prepare -} diff --git a/dev-python/brotlipy/brotlipy-0.7.0-r2.ebuild b/dev-python/brotlipy/brotlipy-0.7.0-r2.ebuild new file mode 100644 index 000000000000..19c941192db1 --- /dev/null +++ b/dev-python/brotlipy/brotlipy-0.7.0-r2.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_6,3_7,3_8} pypy3 ) + +inherit distutils-r1 + +# Commit of the Brotli library bundled within brotlipy. +BROTLI_BUNDLED_COMMIT="46c1a881b41bb638c76247558aa04b1591af3aa7" + +DESCRIPTION="Python binding to the Brotli library" +HOMEPAGE="https://github.com/python-hyper/brotlipy/ https://pypi.python.org/pypi/brotlipy" +SRC_URI=" + https://github.com/python-hyper/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/google/brotli/archive/${BROTLI_BUNDLED_COMMIT}.tar.gz -> brotli-${BROTLI_BUNDLED_COMMIT}.tar.gz +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 sparc x86" + +# module name collision with app-arch/brotli +RDEPEND=" + virtual/python-cffi[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/enum34[${PYTHON_USEDEP}]' -2) + !app-arch/brotli[python]" +DEPEND=" + test? ( + dev-python/hypothesis[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/brotlipy-0.7.0-test-deadline.patch +) + +src_prepare() { + # Inject the brotli lib. + rm -r "${WORKDIR}/${P}/libbrotli" || die "Could not remove the bundled brotli lib folder." + cp -r "${WORKDIR}/brotli-${BROTLI_BUNDLED_COMMIT}/" "${WORKDIR}/${P}/libbrotli" || die "Could not inject the brotli lib." + + # Tests fail if we have this folder preserved within the lib. + rm -r "${WORKDIR}/${P}/libbrotli/python" || die "Could not remove 'python' subfolder." + + distutils-r1_src_prepare +} -- cgit v1.2.3-65-gdbad