summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-python/python-twitter/Manifest1
-rw-r--r--dev-python/python-twitter/python-twitter-3.4.2.ebuild63
2 files changed, 64 insertions, 0 deletions
diff --git a/dev-python/python-twitter/Manifest b/dev-python/python-twitter/Manifest
index 86bd6e9243b3..035d9eb01d14 100644
--- a/dev-python/python-twitter/Manifest
+++ b/dev-python/python-twitter/Manifest
@@ -1 +1,2 @@
DIST python-twitter-3.3.tar.gz 84696 BLAKE2B aad833904e0127fca4043bf66187e7ff5a4175c7c86cf9b053c7d0bc6c9f25d2bc102a631d479ebd4ce81b515aea0f058473993a1b7f5a03751dd83f39e9a3c3 SHA512 72e4133abddf86a19b8701f846df7eb99b426b8835e457455935a656f38c266fb2930d8a145d5d280ef2e0f0096511b29dcdf98b94bd53b6a661ea575cfb3265
+DIST python-twitter-3.4.2.tar.gz 5145121 BLAKE2B 2ac45ae8fde3cfccb794d8496efdb0066c887101b6a6ac55ad6fd0f9fda8f50db1245284236c5fa0fd8eb7419c11eb253777d78092ea138d2f0a5115db861a89 SHA512 23d009e006864bb9dbf9c10223531a0e2aeefd4ca59852849f49f41e36b6db29e820a58c8a43f23c7bda0c68b6eb19a5557ef649bae2cbb1f1e406f78a918f92
diff --git a/dev-python/python-twitter/python-twitter-3.4.2.ebuild b/dev-python/python-twitter/python-twitter-3.4.2.ebuild
new file mode 100644
index 000000000000..bc33c87db6bc
--- /dev/null
+++ b/dev-python/python-twitter/python-twitter-3.4.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python wrapper around the Twitter API"
+HOMEPAGE="https://github.com/bear/python-twitter"
+# Upstream does not include tests or doc in the PyPI tarballs
+# https://github.com/bear/python-twitter/pull/572
+SRC_URI="https://github.com/bear/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-macos"
+IUSE="doc examples test"
+
+RDEPEND="
+ dev-python/oauth2[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/requests-oauthlib[${PYTHON_USEDEP}]"
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ ${RDEPEND}
+ >=dev-python/responses-0.6.1[${PYTHON_USEDEP}]
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ )
+"
+
+python_prepare_all() {
+ # Not actually required unless we want to do setup.py test
+ # https://github.com/bear/python-twitter/pull/573
+ sed -i "s/'pytest-runner'//" setup.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ if use doc; then
+ sphinx-build doc doc/_build/html || die
+ HTML_DOCS=( doc/_build/html/. )
+ fi
+}
+
+python_test() {
+ py.test || die "tests failed with ${EPYTHON}"
+}
+
+python_install_all() {
+ if use examples; then
+ docinto examples
+ dodoc -r examples/.
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ distutils-r1_python_install_all
+}