summaryrefslogtreecommitdiff
path: root/dev-python/pushbullet-py
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/pushbullet-py
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/pushbullet-py')
-rw-r--r--dev-python/pushbullet-py/Manifest6
-rw-r--r--dev-python/pushbullet-py/files/pushbullet-py-0.10.0-fix-filetypes-python3.patch28
-rw-r--r--dev-python/pushbullet-py/metadata.xml13
-rw-r--r--dev-python/pushbullet-py/pushbullet-py-0.10.0.ebuild53
-rw-r--r--dev-python/pushbullet-py/pushbullet-py-0.11.0.ebuild49
5 files changed, 149 insertions, 0 deletions
diff --git a/dev-python/pushbullet-py/Manifest b/dev-python/pushbullet-py/Manifest
new file mode 100644
index 000000000000..eca062b56ed5
--- /dev/null
+++ b/dev-python/pushbullet-py/Manifest
@@ -0,0 +1,6 @@
+AUX pushbullet-py-0.10.0-fix-filetypes-python3.patch 705 BLAKE2B d70f4746288bc3a54d4f5a780722ef04d85ae5018cb2b62d714856ce11a9596a5767218735def55a31ef9cb0c3628e3ab1422ed4e40001fc7754d2409f190058 SHA512 b349e98877eaa540c688f7e1d1c3dbfe708e2bda253f8cd177f26510716db58f8c3ac10531722a16706f7e53951cfa99268b9afa0597558630c344f7bea6bf1e
+DIST pushbullet-py-0.10.0.tar.gz 18929 BLAKE2B 900e42ce407a0baff0b24cbe6e04a3c10e1aeb9f7dbfc917cd58b2c35a2f42f81c0aa935fecdbd50d087a45d309b9baad1e3e5235568461b3e54c12874a2ac93 SHA512 2e259b76413c5e644350a891678eb98f761e56b18f5a06a9d7cc34353c7c7ee67fa875aed575b1b005782b21f4440d682db5c09be7033d52b7b9cf41e9120123
+DIST pushbullet.py-0.11.0.tar.gz 21653 BLAKE2B a6c9b6f4958ce35b63ea4043d1d4f8691885bd0aa2927af541f2080a0b0b65a7df979a497967f3adceab8ad2382448a4c6a02d1184c9d72a18d91844eb970722 SHA512 b236f30b99e5bb79eff183529716c1c8f83cfd2526fdf50d86041eb6d3fcd6670d0c4dce407ae6e50aea0fa96d6a5527af980148f0c71ef758c480f972ad9659
+EBUILD pushbullet-py-0.10.0.ebuild 1314 BLAKE2B 91a47036e6c14fdcc07287da19a16415956c4500566afbbb82d71e88d98de57adf9bc6c354d4c376cae8930d73bdea27f504a6599f2c2b2f21e68d0041c53e98 SHA512 c92e9f2370b0f9772613f80009fd3999688adc7a0766a2b02177d7c902cb639fc6392288cf79db33b24968a20b8302b782088f635b6c096acc8ab8c366795b4e
+EBUILD pushbullet-py-0.11.0.ebuild 1118 BLAKE2B 46dbe69be3a1084fc9e20cd14c4dae99bd91edfea73530616cfb2d8aaf47abf1559cba484b01787d72deb902c1a1b7c6f66dc7ce38f0793f3fa8da283371c297 SHA512 4186f0297d9b929091b67964f221dd31544157e7165a96db5e7bb2bfdc6dd65a70c125f79a0b853406524ed29e7fce5a18a2fd850e02eb173cb8456578742e52
+MISC metadata.xml 459 BLAKE2B 86e83479fde9503defd709e67ea6ba81e5dd9430e1e1b4ea6545f332979173fab9a2392528007638531c58ec205f2d45ca9817f21981b4ebd94f0f81596bde71 SHA512 cda083520abafb4b81b0691234a2bc2bbdf75f4bef69943e5243492a8d8916f9924eae5f06288a6f636ef7bf36477e198dc6a33a04e55a9fd2376a03999f91a2
diff --git a/dev-python/pushbullet-py/files/pushbullet-py-0.10.0-fix-filetypes-python3.patch b/dev-python/pushbullet-py/files/pushbullet-py-0.10.0-fix-filetypes-python3.patch
new file mode 100644
index 000000000000..09ded3540487
--- /dev/null
+++ b/dev-python/pushbullet-py/files/pushbullet-py-0.10.0-fix-filetypes-python3.patch
@@ -0,0 +1,28 @@
+diff --git a/pushbullet/filetype.py b/pushbullet/filetype.py
+index a2f2be0..22ffedf 100644
+--- a/pushbullet/filetype.py
++++ b/pushbullet/filetype.py
+@@ -1,13 +1,22 @@
+ def _magic_get_file_type(f, _):
+ file_type = magic.from_buffer(f.read(1024), mime=True)
+ f.seek(0)
+- return file_type.decode('utf-8')
++ return maybe_decode(file_type)
+
+
+ def _guess_file_type(_, filename):
+ return mimetypes.guess_type(filename)[0]
+
+
++# return str on python3. Don't want to unconditionally
++# decode because that results in unicode on python2
++def maybe_decode(s):
++ if str == bytes:
++ return s.decode('utf-8')
++ else:
++ return s
++
++
+ try:
+ import magic
+ except ImportError:
diff --git a/dev-python/pushbullet-py/metadata.xml b/dev-python/pushbullet-py/metadata.xml
new file mode 100644
index 000000000000..27bb94ce1bfd
--- /dev/null
+++ b/dev-python/pushbullet-py/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>sbraz@gentoo.org</email>
+ <name>Louis Sautier</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">pushbullet.py</remote-id>
+ <remote-id type="github">randomchars/pushbullet.py</remote-id>
+ <bugs-to>https://github.com/randomchars/pushbullet.py/issues</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pushbullet-py/pushbullet-py-0.10.0.ebuild b/dev-python/pushbullet-py/pushbullet-py-0.10.0.ebuild
new file mode 100644
index 000000000000..3141c91dae26
--- /dev/null
+++ b/dev-python/pushbullet-py/pushbullet-py-0.10.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit distutils-r1
+
+MY_PN=${PN/-/.}
+DESCRIPTION="A simple python client for pushbullet.com"
+HOMEPAGE="https://github.com/randomchars/pushbullet.py"
+# tests and examples are missing from PyPI tarballs
+# https://github.com/randomchars/pushbullet.py/pull/104
+SRC_URI="https://github.com/randomchars/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples test"
+
+RDEPEND="
+ dev-python/python-magic[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/websocket-client[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ ${RDEPEND}
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/pytest-runner[${PYTHON_USEDEP}]
+ )
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+# Backport from upstream git
+PATCHES=( "${FILESDIR}/${P}-fix-filetypes-python3.patch" )
+
+python_test() {
+ # skip tests which require network access
+ PUSHBULLET_API_KEY= py.test \
+ -k "not test_auth" || die "Tests failed with ${EPYTHON}"
+}
+
+python_install_all() {
+ if use examples; then
+ docompress -x "/usr/share/doc/${PF}/examples"
+ docinto examples
+ dodoc -r example/.
+ fi
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/pushbullet-py/pushbullet-py-0.11.0.ebuild b/dev-python/pushbullet-py/pushbullet-py-0.11.0.ebuild
new file mode 100644
index 000000000000..4a035f018675
--- /dev/null
+++ b/dev-python/pushbullet-py/pushbullet-py-0.11.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
+
+inherit distutils-r1
+
+MY_PN=${PN/-/.}
+DESCRIPTION="A simple python client for pushbullet.com"
+HOMEPAGE="https://github.com/randomchars/pushbullet.py"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples test"
+
+RDEPEND="
+ dev-python/cryptography[${PYTHON_USEDEP}]
+ dev-python/python-magic[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/websocket-client[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ ${RDEPEND}
+ dev-python/pytest[${PYTHON_USEDEP}]
+ )
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+python_test() {
+ # skip tests which require network access
+ PUSHBULLET_API_KEY= py.test \
+ -k "not (test_auth or test_decryption)" \
+ || die "Tests failed with ${EPYTHON}"
+}
+
+python_install_all() {
+ if use examples; then
+ docompress -x "/usr/share/doc/${PF}/examples"
+ docinto examples
+ dodoc -r example/.
+ fi
+ distutils-r1_python_install_all
+}