summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Alff2018-12-13 00:16:58 -0500
committerTed Alff2018-12-13 00:16:58 -0500
commit207690ef34eaee59542e7e26b87abd96ab953f24 (patch)
tree555519410da977ac3e2d486da374fb26d7874001
parent1e57d275ad982db8c664e88a4787aa498523e0d2 (diff)
downloadaur-207690ef34eaee59542e7e26b87abd96ab953f24.tar.gz
Patch for python 3 for nemo-python >= 3.9.0 -- I don't use insync, so don't know if this still works...
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD14
-rw-r--r--python3.patch78
3 files changed, 91 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 13511e9e83c0..80b7dae2a715 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,19 @@
# Generated by mksrcinfo v8
-# Fri Jul 14 19:16:04 UTC 2017
+# Thu Dec 13 05:16:34 UTC 2018
pkgbase = insync-nemo
pkgdesc = Nemo integration for insync
pkgver = 1.3.12.36116
- pkgrel = 1
+ pkgrel = 2
url = https://www.insynchq.com/downloads
arch = any
license = custom:insync
- makedepends = gtk-doc
depends = insync
depends = nemo-python
options = !strip
source = insync-nemo-1.3.12.36116.deb::http://s.insynchq.com/builds/insync-nemo_1.3.12.36116-precise_all.deb
+ source = python3.patch
sha256sums = e3b9ac6be0a2f0488aea05753c37b271763cc2f145ff860f5615a79bf2dc2113
+ sha256sums = b67da8737af3b32ff392aa365ef6f1ce318c3a5c64d81819eac54f5a7ad6682e
pkgname = insync-nemo
diff --git a/PKGBUILD b/PKGBUILD
index d688fa2eae75..468f44fd3bd0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,17 +4,21 @@
pkgname=insync-nemo
pkgver=1.3.12.36116
-pkgrel=1
+pkgrel=2
pkgdesc="Nemo integration for insync"
url="https://www.insynchq.com/downloads"
license=('custom:insync')
options=(!strip)
arch=('any')
depends=("insync" "nemo-python")
-makedepends=('gtk-doc')
-source=("${pkgname}-${pkgver}.deb::http://s.insynchq.com/builds/${pkgname}_${pkgver}-precise_all.deb")
-sha256sums=('e3b9ac6be0a2f0488aea05753c37b271763cc2f145ff860f5615a79bf2dc2113')
+source=("${pkgname}-${pkgver}.deb::http://s.insynchq.com/builds/${pkgname}_${pkgver}-precise_all.deb"
+ 'python3.patch')
+sha256sums=('e3b9ac6be0a2f0488aea05753c37b271763cc2f145ff860f5615a79bf2dc2113'
+ 'b67da8737af3b32ff392aa365ef6f1ce318c3a5c64d81819eac54f5a7ad6682e')
package() {
- tar -zxf "${srcdir}"/data.tar.gz -C "${pkgdir}"
+ cd "${srcdir}"
+ tar -zxf data.tar.gz
+ patch -Np1 -i ../python3.patch
+ cp -r usr "${pkgdir}"
}
diff --git a/python3.patch b/python3.patch
new file mode 100644
index 000000000000..f0404c9ae09f
--- /dev/null
+++ b/python3.patch
@@ -0,0 +1,78 @@
+diff -Naur ./usr.bak/share/nemo-python/extensions/insync-nemo-plugin.py ./usr/share/nemo-python/extensions/insync-nemo-plugin.py
+--- ./usr.bak/share/nemo-python/extensions/insync-nemo-plugin.py 2018-12-13 00:10:11.813708370 -0500
++++ ./usr/share/nemo-python/extensions/insync-nemo-plugin.py 2018-12-13 00:10:56.838040063 -0500
+@@ -1,6 +1,7 @@
+ print('loading insync nemo plugin..')
+ from gi.repository import GObject
+ from gi.repository import Nemo
++import importlib
+
+ DEV_MODE = False
+
+@@ -8,17 +9,17 @@
+ import os
+ import socket
+ import sys
+-import urllib
++import urllib.request, urllib.parse, urllib.error
+
+
+ if sys.getdefaultencoding() != 'utf-8':
+- reload(sys)
++ importlib.reload(sys)
+ sys.setdefaultencoding('utf-8') # pylint: disable=E1101
+
+ def ipc_insync(**kw):
+ #print('<ipc-insync>',kw)
+ data = json.dumps( kw )
+- socket_file = u'/tmp/insync%r.sock' % os.getuid()
++ socket_file = '/tmp/insync%r.sock' % os.getuid()
+ if not os.path.exists(socket_file):
+ if DEV_MODE:
+ print('WARN: insync socket not found')
+@@ -65,10 +66,10 @@
+ if file.get_uri_scheme() != 'file':
+ return None
+
+- path = os.path.realpath(urllib.unquote(file.get_uri()[len('file://'):]))
+- path = unicode(path)
++ path = os.path.realpath(urllib.parse.unquote(file.get_uri()[len('file://'):]))
++ path = str(path)
+ if DEV_MODE:
+- print path
++ print(path)
+ is_dir = os.path.isdir(path)
+
+ cm_info = ipc_insync(command='CONTEXT-MENU-ITEMS', full_path=path)
+@@ -88,7 +89,7 @@
+ item_id = 0
+ for text, cmd in cm_items:
+ if text == 'separator':
+- text = u'\u2015' * 10
++ text = '\u2015' * 10
+ name = 'Insync:separator:' + str(item_id)
+ else:
+ name = 'Insync:%s:%d' % (text, item_id)
+@@ -104,7 +105,7 @@
+ return None
+
+ def do_action(self, menu, file, method):
+- path = urllib.unquote(
++ path = urllib.parse.unquote(
+ file.get_uri()[len('file://'):]
+ )
+ ipc_insync( method=method, full_path=path)
+@@ -113,11 +114,11 @@
+ if file.get_uri_scheme() != 'file':
+ return
+
+- filename = urllib.unquote(file.get_uri()[len('file://'):])
++ filename = urllib.parse.unquote(file.get_uri()[len('file://'):])
+ filename = os.path.realpath(filename)
+ status = ipc_insync(command='GET-FILE-STATUS', full_path=filename)
+ if DEV_MODE:
+- print filename, status
++ print(filename, status)
+ if status and status != 'UNKNOWN':
+ emblem = _EMBLEM_KEYS[status]
+ if os.path.isdir(filename):