summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Arndt2018-10-01 19:17:30 +0200
committerChristopher Arndt2018-10-01 19:17:30 +0200
commit0abca6f3405657a0da59d0bc0fe8a417e9052dd3 (patch)
treeec8ed870178c803eb2f96c7d62e544ef4b476b29
parentf6d82ccfa426a3313126c9e657dbcce5fb1e50a0 (diff)
downloadaur-0abca6f3405657a0da59d0bc0fe8a417e9052dd3.tar.gz
New upsteram version 1.0.1; add new dependencyx on 'python-nudatus'; better patch with workaround for webbrowser module bug
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD16
-rw-r--r--webbrowser-issue31014.diff38
3 files changed, 44 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 114eb3757dc..9c23215d0bb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mu-editor
pkgdesc = A simple Python editor for beginner programmers
- pkgver = 1.0.0
- pkgrel = 2
+ pkgver = 1.0.1
+ pkgrel = 1
epoch = 1
url = https://codewith.mu/
arch = any
@@ -12,6 +12,7 @@ pkgbase = mu-editor
depends = python-gpiozero
depends = python-guizero
depends = python-matplotlib
+ depends = python-nudatus
depends = python-pigpio
depends = python-pgzero
depends = python-pycodestyle
@@ -23,10 +24,10 @@ pkgbase = mu-editor
depends = python-requests
depends = python-semver
depends = qt5-serialport
- source = mu-editor-1.0.0.tar.gz::https://github.com/mu-editor/mu/archive/v1.0.0.tar.gz
+ source = mu-editor-1.0.1.tar.gz::https://github.com/mu-editor/mu/archive/1.0.1.tar.gz
source = webbrowser-issue31014.diff
- sha256sums = 63a69fab2cea892126802904332c85f009eea78e1af982dbdfb54a95051258eb
- sha256sums = 0b2896a2e12c672c17088e3648505f0abb732650fa9e7c43a6146d5a2aa79c81
+ sha256sums = 41abc6415ba8c51d62ad6e465dbefec4b0382d586c60d602ebb3d9e373fc5710
+ sha256sums = ee2b9210ddb25ccc29ff857e450646d7b3cd7336a8532de29c76cd2176cc980e
pkgname = mu-editor
diff --git a/PKGBUILD b/PKGBUILD
index 133629b2760..0c4e5e2f4e8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,21 +3,21 @@
pkgname=mu-editor
epoch=1
-pkgver=1.0.0
-pkgrel=2
+pkgver=1.0.1
+pkgrel=1
pkgdesc='A simple Python editor for beginner programmers'
arch=('any')
url='https://codewith.mu/'
license=('GPL3')
-depends=('python-appdirs' 'python-gpiozero' 'python-guizero' 'python-matplotlib' 'python-pigpio'
- 'python-pgzero' 'python-pycodestyle' 'python-pyflakes' 'python-pyqtchart'
+depends=('python-appdirs' 'python-gpiozero' 'python-guizero' 'python-matplotlib' 'python-nudatus'
+ 'python-pigpio' 'python-pgzero' 'python-pycodestyle' 'python-pyflakes' 'python-pyqtchart'
'python-pyserial' 'python-qscintilla-qt5' 'python-qtconsole' 'python-requests'
'python-semver' 'qt5-serialport')
makedepends=('gendesk' 'python-setuptools')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/mu-editor/mu/archive/v$pkgver.tar.gz"
+source=("$pkgname-$pkgver.tar.gz::https://github.com/mu-editor/mu/archive/$pkgver.tar.gz"
'webbrowser-issue31014.diff')
-sha256sums=('63a69fab2cea892126802904332c85f009eea78e1af982dbdfb54a95051258eb'
- '0b2896a2e12c672c17088e3648505f0abb732650fa9e7c43a6146d5a2aa79c81')
+sha256sums=('41abc6415ba8c51d62ad6e465dbefec4b0382d586c60d602ebb3d9e373fc5710'
+ 'ee2b9210ddb25ccc29ff857e450646d7b3cd7336a8532de29c76cd2176cc980e')
prepare() {
@@ -27,7 +27,7 @@ prepare() {
sed -i -e "s/'pyqt5==[0-9.]*',//" -e "s/'qscintilla==[0-9.]*',//" setup.py
# Un-pin all other dependencies, so package doesn't break when a dependency is updated
sed -i -e 's/==/>=/g' setup.py
- patch -Np0 -i "${srcdir}/webbrowser-issue31014.diff"
+ patch -Np1 -i "${srcdir}/webbrowser-issue31014.diff"
}
build() {
diff --git a/webbrowser-issue31014.diff b/webbrowser-issue31014.diff
index 15291cd80ce..5f126434950 100644
--- a/webbrowser-issue31014.diff
+++ b/webbrowser-issue31014.diff
@@ -1,13 +1,35 @@
---- mu/logic.py.orig 2018-08-14 22:14:04.663531208 +0200
-+++ mu/logic.py 2018-08-14 22:14:25.616864697 +0200
-@@ -988,6 +988,10 @@
+diff --git a/mu/logic.py b/mu/logic.py
+index be7c7e7..0607676 100644
+--- a/mu/logic.py
++++ b/mu/logic.py
+@@ -977,6 +977,21 @@ class Editor:
+ else:
+ self._view.reset_annotations()
+
++ def _open_webbrowser(self, url):
++ if not webbrowser._browsers and sys.version_info[:3] == (3, 7, 0):
++ # See https://bugs.python.org/issue31014
++ env_browser = os.environ.get('BROWSER')
++ if env_browser:
++ del os.environ['BROWSER']
++ webbrowser.register_standard_browsers()
++ if env_browser and env_browser not in webbrowser._browsers:
++ webbrowser.register(env_browser, None,
++ webbrowser.GenericBrowser(env_browser),
++ preferred=True)
++ if env_browser:
++ os.environ['BROWSER'] = env_browser
++ return webbrowser.open_new(url)
++
+ def show_help(self):
+ """
+ Display browser based help about Mu.
+@@ -990,7 +1005,7 @@ class Editor:
major_version = '.'.join(__version__.split('.')[:2])
url = 'https://codewith.mu/{}/help/{}'.format(language_code,
major_version)
-+ # XXX: hacky workaround for https://bugs.python.org/issue31014
-+ if 'BROWSER' in os.environ:
-+ del os.environ['BROWSER']
-+
- webbrowser.open_new(url)
+- webbrowser.open_new(url)
++ self._open_webbrowser(url)
def quit(self, *args, **kwargs):
+ """