Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-python/brotlipy: Introducing the package #8261

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions dev-python/brotlipy/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DIST brotli-46c1a881b41bb638c76247558aa04b1591af3aa7.tar.gz 19840371 BLAKE2B b9a1c3c2e5b62bd63b392debe54bd1732ac1cb31f88500f0142108b453649d96901d9a03b6db98642cb9abaf9188c06d440f2b8bd3cf57fbbb52196a931f5079 SHA512 dc573c90491032a205f32f0ce9c93e95b06c70a3107caa9501e038a212226c37117d63709a29843367344bf7d18cf32d0c0578b11166387198e12b38b1522406
DIST brotlipy-0.7.0.tar.gz 19375 BLAKE2B 035dc8757e491bc4fc0d8e2b6b82703eecc8f6f4150da42fda0f6c6f42a617519f5191371eb1dd976b8bbfeab88845bb018b874a395cdbf0ff409a6911f969f5 SHA512 bec8183cf3cc8ba9e594d1a86a8a33d88a6ac8e9c6a6287c837bda3726183ff1b486f2c49da4e489b5b3cb51b57dd5816413b59419920c2ced48435221f1beaf
48 changes: 48 additions & 0 deletions dev-python/brotlipy/brotlipy-0.7.0.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )

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="~amd64 ~x86"
IUSE="test"

RDEPEND="virtual/python-cffi[${PYTHON_USEDEP}]"
DEPEND="
${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/hypothesis[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
)
"

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."

eapply_user
}

python_test() {
py.test -v || die "Testing failed"
}
12 changes: 12 additions & 0 deletions dev-python/brotlipy/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>oleksandr.trotsenko@gmail.com</email>
<name>Oleksandr Trotsenko</name>
</maintainer>
<maintainer type="project">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
</pkgmetadata>