public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrice Clement" <monsieurp@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/yowsup/files/, net-im/yowsup/
Date: Fri, 28 Dec 2018 23:01:38 +0000 (UTC)	[thread overview]
Message-ID: <1546038074.59102683bac0b71ebe69770078d1d0c783574b29.monsieurp@gentoo> (raw)

commit:     59102683bac0b71ebe69770078d1d0c783574b29
Author:     Conrad Kostecki <conrad <AT> kostecki <DOT> com>
AuthorDate: Mon Dec 17 19:03:50 2018 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Fri Dec 28 23:01:14 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59102683

net-im/yowsup: add python3.7 support

Also switch from dev-python/pycrpto to dev-python/pycrptodome, as it's more
modern. Besides, renamed six patch, to have a proper file name.

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Conrad Kostecki <conrad <AT> kostecki.com>
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 .../files/yowsup-2.5.7-add-python3.7-support.patch | 51 ++++++++++++++++++++++
 .../files/yowsup-2.5.7-fix-install-path.patch      | 28 ++++++++++++
 ...sion.patch => yowsup-2.5.7-fix-newer-six.patch} |  0
 net-im/yowsup/yowsup-2.5.7-r1.ebuild               |  2 +-
 ...wsup-2.5.7-r1.ebuild => yowsup-2.5.7-r2.ebuild} | 11 +++--
 5 files changed, 88 insertions(+), 4 deletions(-)

diff --git a/net-im/yowsup/files/yowsup-2.5.7-add-python3.7-support.patch b/net-im/yowsup/files/yowsup-2.5.7-add-python3.7-support.patch
new file mode 100644
index 00000000000..6d3f3c83004
--- /dev/null
+++ b/net-im/yowsup/files/yowsup-2.5.7-add-python3.7-support.patch
@@ -0,0 +1,51 @@
+Description: Fix compatibility with Python 3.7 since async has become a reserved word
+Author: Josue Ortega <josue@debian.org>
+Last-Update: 2018-07-29
+
+--- a/yowsup/demos/cli/layer.py
++++ b/yowsup/demos/cli/layer.py
+@@ -559,7 +559,7 @@
+             mediaUploader = MediaUploader(jid, self.getOwnJid(), filePath,
+                                       resultRequestUploadIqProtocolEntity.getUrl(),
+                                       resultRequestUploadIqProtocolEntity.getResumeOffset(),
+-                                      successFn, self.onUploadError, self.onUploadProgress, async=False)
++                                      successFn, self.onUploadError, self.onUploadProgress, asyncronous=False)
+             mediaUploader.start()
+ 
+     def onRequestUploadError(self, jid, path, errorRequestUploadIqProtocolEntity, requestUploadIqProtocolEntity):
+--- a/yowsup/layers/interface/interface.py
++++ b/yowsup/layers/interface/interface.py
+@@ -125,7 +125,7 @@
+             mediaUploader = MediaUploader(builder.jid, self.getOwnJid(), builder.getFilepath(),
+                                       resultRequestUploadIqProtocolEntity.getUrl(),
+                                       resultRequestUploadIqProtocolEntity.getResumeOffset(),
+-                                      successFn, errorFn, progress, async=True)
++                                      successFn, errorFn, progress, asyncronous=True)
+             mediaUploader.start()
+ 
+     def __onRequestUploadError(self, errorEntity, requestUploadEntity, builder, error = None):
+--- a/yowsup/layers/protocol_media/mediauploader.py
++++ b/yowsup/layers/protocol_media/mediauploader.py
+@@ -9,10 +9,11 @@
+ logger = logging.getLogger(__name__)
+ 
+ class MediaUploader(WARequest, threading.Thread):
+-    def __init__(self, jid, accountJid, sourcePath, uploadUrl, resumeOffset = 0, successClbk = None, errorClbk = None, progressCallback = None, async = True):
++    def __init__(self, jid, accountJid, sourcePath, uploadUrl, resumeOffset=0, successClbk=None,
++                 errorClbk=None, progressCallback=None, asyncronous=True):
+         WARequest.__init__(self)
+ 
+-        self.async = async
++        self.asyncronous = asyncronous
+         self.jid = jid
+         self.accountJid = accountJid
+         self.sourcePath = sourcePath
+@@ -30,7 +31,7 @@
+         self.sock = socket.socket()
+ 
+     def start(self):
+-        if self.async:
++        if self.asyncronous:
+             threading.Thread.__init__(self)
+             super(MediaUploader, self).start()
+         else:

diff --git a/net-im/yowsup/files/yowsup-2.5.7-fix-install-path.patch b/net-im/yowsup/files/yowsup-2.5.7-fix-install-path.patch
new file mode 100644
index 00000000000..63b0fbfc91c
--- /dev/null
+++ b/net-im/yowsup/files/yowsup-2.5.7-fix-install-path.patch
@@ -0,0 +1,28 @@
+Description: Fixes wrong installation of mime.types file.
+Author: Josue Ortega <josue@debian.org>
+Last-Update: 2016-09-04
+
+--- a/setup.py
++++ b/setup.py
+@@ -33,7 +33,7 @@
+     #long_description=long_description,
+     packages= find_packages(),
+     include_package_data=True,
+-    data_files = [('yowsup/common', ['yowsup/common/mime.types'])],
++    #data_files = [('yowsup/common', ['yowsup/common/mime.types'])],
+     platforms='any',
+     #test_suite='',
+     classifiers = [
+--- a/yowsup/common/tools.py
++++ b/yowsup/common/tools.py
+@@ -150,7 +150,9 @@
+         return preview
+ 
+ class MimeTools:
+-    MIME_FILE = os.path.join(os.path.dirname(__file__), 'mime.types')
++    # Replaces mime.types path for the debian path installation
++    # MIME_FILE = os.path.join(os.path.dirname(__file__), 'mime.types')
++    MIME_FILE = os.path.join('/usr/share/yowsup/common', 'mime.types')
+     mimetypes.init() # Load default mime.types
+     try:
+         mimetypes.init([MIME_FILE]) # Append whatsapp mime.types

diff --git a/net-im/yowsup/files/fix_newer_six_version.patch b/net-im/yowsup/files/yowsup-2.5.7-fix-newer-six.patch
similarity index 100%
rename from net-im/yowsup/files/fix_newer_six_version.patch
rename to net-im/yowsup/files/yowsup-2.5.7-fix-newer-six.patch

diff --git a/net-im/yowsup/yowsup-2.5.7-r1.ebuild b/net-im/yowsup/yowsup-2.5.7-r1.ebuild
index 7c53464c30f..b3435a6d6ed 100644
--- a/net-im/yowsup/yowsup-2.5.7-r1.ebuild
+++ b/net-im/yowsup/yowsup-2.5.7-r1.ebuild
@@ -28,4 +28,4 @@ RDEPEND="
 DEPEND="${RDEPEND}"
 BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 
-PATCHES=( "${FILESDIR}/fix_newer_six_version.patch" )
+PATCHES=( "${FILESDIR}/${P}-fix-newer-six.patch" )

diff --git a/net-im/yowsup/yowsup-2.5.7-r1.ebuild b/net-im/yowsup/yowsup-2.5.7-r2.ebuild
similarity index 76%
copy from net-im/yowsup/yowsup-2.5.7-r1.ebuild
copy to net-im/yowsup/yowsup-2.5.7-r2.ebuild
index 7c53464c30f..48ac9722544 100644
--- a/net-im/yowsup/yowsup-2.5.7-r1.ebuild
+++ b/net-im/yowsup/yowsup-2.5.7-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
 PYTHON_REQ_USE="readline"
 
 inherit distutils-r1
@@ -20,12 +20,17 @@ RDEPEND="
 	dev-python/configargparse[${PYTHON_USEDEP}]
 	dev-python/pillow[${PYTHON_USEDEP}]
 	dev-python/protobuf-python[${PYTHON_USEDEP}]
-	dev-python/pycrypto[${PYTHON_USEDEP}]
+	dev-python/pycryptodome[${PYTHON_USEDEP}]
 	dev-python/python-axolotl-curve25519[${PYTHON_USEDEP}]
 	dev-python/python-dateutil[${PYTHON_USEDEP}]
 "
 
 DEPEND="${RDEPEND}"
+
 BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 
-PATCHES=( "${FILESDIR}/fix_newer_six_version.patch" )
+PATCHES=(
+	"${FILESDIR}/${P}-add-python3.7-support.patch"
+	"${FILESDIR}/${P}-fix-install-path.patch"
+	"${FILESDIR}/${P}-fix-newer-six.patch"
+	)


             reply	other threads:[~2018-12-28 23:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-28 23:01 Patrice Clement [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-02 18:16 [gentoo-commits] repo/gentoo:master commit in: net-im/yowsup/files/, net-im/yowsup/ Joonas Niilola
2019-10-07  5:20 Joonas Niilola
2019-12-18 18:19 Conrad Kostecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1546038074.59102683bac0b71ebe69770078d1d0c783574b29.monsieurp@gentoo \
    --to=monsieurp@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox