diff options
author | Muflone | 2019-10-12 19:06:47 +0200 |
---|---|---|
committer | Muflone | 2019-10-12 19:06:47 +0200 |
commit | fe46280e751ea16a24c3e1de6bcd99511462cfdb (patch) | |
tree | 503d82c3d89ec320ec9e92d26f4a6a090631dc28 | |
download | aur-spyder2.tar.gz |
New package spyder2 3.3.6-1
-rw-r--r-- | .SRCINFO | 48 | ||||
-rw-r--r-- | PKGBUILD | 70 | ||||
-rw-r--r-- | bug_51437.patch | 35 | ||||
-rw-r--r-- | bug_53489_python2-optional-nbconvert.patch | 12 | ||||
-rw-r--r-- | bug_54508_missing_pyqt4_qtwebkit.patch | 24 | ||||
-rw-r--r-- | python2.patch | 17 |
6 files changed, 206 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 00000000000..38440a0baf0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,48 @@ +pkgbase = spyder2 + pkgdesc = The Scientific Python Development Environment (Python 2 version) + pkgver = 3.3.6 + pkgrel = 1 + url = https://www.spyder-ide.org/ + arch = any + license = MIT + makedepends = python2-setuptools + makedepends = python2-sphinx + depends = python2-pyqt5 + depends = qt5-webkit + depends = python2-qtconsole + depends = python2-qtpy + depends = python2-qtawesome + depends = python2-pyflakes + depends = python2-pyzmq + depends = python2-pygments + depends = python2-psutil + depends = python2-pickleshare + depends = python2-rope + depends = python2-jedi + depends = python2-pylint + depends = python2-pycodestyle + depends = python2-sphinx + depends = python2-opengl + depends = python2-spyder-kernels<1.0 + depends = icu + depends = gtk-update-icon-cache + depends = desktop-file-utils + optdepends = python2-numpy: N-dimensional arrays + optdepends = python2-scipy: signal/image processing + optdepends = python2-h5py: HDF5 support + optdepends = python2-matplotlib: interactive 2D/3D data plotting + optdepends = python2-sympy: symbolic mathematics for the IPython console + optdepends = python2-pandas: view and edit DataFrames and Series in the Variable Explorer + source = spyder-3.3.6.tar.gz::https://github.com/spyder-ide/spyder/archive/v3.3.6.tar.gz + source = python2.patch + source = bug_53489_python2-optional-nbconvert.patch + source = bug_54508_missing_pyqt4_qtwebkit.patch + source = bug_51437.patch + sha256sums = aa3e46e30da987a2532854d3ba30143f7876bddb3be1b0d5ced11a7ab7abea83 + sha256sums = 84b8d5e9640d5d347ac4564130f217368cc3f823de30b458d467a05e60bbc8da + sha256sums = 7486faba90da062ef8da6912bfabd22b59343b1275758f04e4a41df2b3b8eec0 + sha256sums = 28d4aa8938d809c299ab6bf6b00a2f82677f9a98a9763b7127970881b76276f5 + sha256sums = f594996710b3e9a66eaa7ad3951fbcf415276253e33ec84f51bf756053ff8e67 + +pkgname = spyder2 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 00000000000..e1a6a295fee --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintainer: Muflone http://www.muflone.com/contacts/english/ +# Contributor: Francois Boulogne <fboulogne@april.org> +# Contributor: TDY <tdy@gmx.com> + +pkgname=spyder2 +_pkgname=spyder +pkgver=3.3.6 +pkgrel=1 +pkgdesc='The Scientific Python Development Environment (Python 2 version)' +arch=('any') +url='https://www.spyder-ide.org/' +license=('MIT') +source=("${_pkgname}-${pkgver}.tar.gz"::"https://github.com/spyder-ide/${_pkgname}/archive/v${pkgver}.tar.gz" + "python2.patch" + "bug_53489_python2-optional-nbconvert.patch" + "bug_54508_missing_pyqt4_qtwebkit.patch" + "bug_51437.patch") +sha256sums=('aa3e46e30da987a2532854d3ba30143f7876bddb3be1b0d5ced11a7ab7abea83' + '84b8d5e9640d5d347ac4564130f217368cc3f823de30b458d467a05e60bbc8da' + '7486faba90da062ef8da6912bfabd22b59343b1275758f04e4a41df2b3b8eec0' + '28d4aa8938d809c299ab6bf6b00a2f82677f9a98a9763b7127970881b76276f5' + 'f594996710b3e9a66eaa7ad3951fbcf415276253e33ec84f51bf756053ff8e67') +makedepends=('python2-setuptools' 'python2-sphinx') +depends=('python2-pyqt5' 'qt5-webkit' 'python2-qtconsole' 'python2-qtpy' 'python2-qtawesome' + 'python2-pyflakes' 'python2-pyzmq' 'python2-pygments' 'python2-psutil' 'python2-pickleshare' + 'python2-rope' 'python2-jedi' 'python2-pylint' 'python2-pycodestyle' 'python2-sphinx' + 'python2-opengl' 'python2-spyder-kernels<1.0' 'icu' 'gtk-update-icon-cache' + 'desktop-file-utils') +optdepends=('python2-numpy: N-dimensional arrays' + 'python2-scipy: signal/image processing' + 'python2-h5py: HDF5 support' + 'python2-matplotlib: interactive 2D/3D data plotting' + 'python2-sympy: symbolic mathematics for the IPython console' + 'python2-pandas: view and edit DataFrames and Series in the Variable Explorer') + +prepare() { + cd "${_pkgname}-${pkgver}" + # Forced QT API to pyqt5 (see https://bugs.archlinux.org/task/54508) + echo "Applying patches bug_54508_missing_pyqt4_qtwebkit.patch" + patch -p1 -i "../bug_54508_missing_pyqt4_qtwebkit.patch" + # Replace spyder with spyder2 (see https://bugs.archlinux.org/task/51437) + echo "Applying patches bug_51437.patch" + patch -p1 -i "../bug_51437.patch" + mv "img_src/spyder.png" "img_src/${pkgname}.png" + mv "scripts/spyder.desktop" "scripts/${pkgname}.desktop" + + echo "Applying patches python2.patch" + patch -p1 -i "../python2.patch" + echo "Applying patches bug_53489_python2-optional-nbconvert.patch" + patch -p1 -i "../bug_53489_python2-optional-nbconvert.patch" +} + +build() { + cd "${_pkgname}-${pkgver}" + python2 setup.py build +} + +package() { + cd "${_pkgname}-${pkgver}" + python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 + # Install license file + install -D -m644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt" + # Install icon and desktop file + install -D -m644 "spyder/images/spyder.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg" + # Change main executable name + mv "${pkgdir}/usr/bin/spyder" "${pkgdir}/usr/bin/${pkgname}" + # Remove useless spyder_win_post_install script + rm -f "${pkgdir}/usr/bin/spyder_win_post_install.py" +} + diff --git a/bug_51437.patch b/bug_51437.patch new file mode 100644 index 00000000000..c8e5fbc055d --- /dev/null +++ b/bug_51437.patch @@ -0,0 +1,35 @@ +diff -Naur spyder-3.3.1.orig/scripts/spyder.desktop spyder-3.3.1/scripts/spyder.desktop +--- spyder-3.3.1.orig/scripts/spyder.desktop 2018-08-11 23:31:15.000000000 +0200 ++++ spyder-3.3.1/scripts/spyder.desktop 2018-08-12 00:36:03.890345817 +0200 +@@ -1,12 +1,11 @@ + [Desktop Entry] + Type=Application + Version=1.0 +-Name=Spyder +-GenericName=Spyder +-Comment=The Scientific Python Development Environment +-Icon=spyder +-TryExec=spyder +-Exec=spyder %F ++Name=Spyder for Python 2.x ++Comment=The Scientific Python Development Environment - Python 2 ++Icon=spyder2 ++TryExec=spyder2 ++Exec=spyder2 %F + Terminal=false + MimeType=text/x-python; + Categories=Development;Science;IDE;Qt; +diff -Naur spyder-3.3.1.orig/setup.py spyder-3.3.1/setup.py +--- spyder-3.3.1.orig/setup.py 2018-08-11 23:31:15.000000000 +0200 ++++ spyder-3.3.1/setup.py 2018-08-12 00:37:27.851154407 +0200 +@@ -88,8 +88,8 @@ + ('share/icons', ['img_src/spyder3.png']), + ('share/metainfo', ['scripts/spyder3.appdata.xml'])] + else: +- data_files = [('share/applications', ['scripts/spyder.desktop']), +- ('share/icons', ['img_src/spyder.png'])] ++ data_files = [('share/applications', ['scripts/spyder2.desktop']), ++ ('share/icons', ['img_src/spyder2.png'])] + elif os.name == 'nt': + data_files = [('scripts', ['img_src/spyder.ico', + 'img_src/spyder_reset.ico'])] diff --git a/bug_53489_python2-optional-nbconvert.patch b/bug_53489_python2-optional-nbconvert.patch new file mode 100644 index 00000000000..1cb37fd85c8 --- /dev/null +++ b/bug_53489_python2-optional-nbconvert.patch @@ -0,0 +1,12 @@ +diff -Naur spyder-3.2.0.orig/spyder/plugins/editor.py spyder-3.2.0/spyder/plugins/editor.py +--- spyder-3.2.0.orig/spyder/plugins/editor.py 2017-07-24 05:03:40.000000000 +0200 ++++ spyder-3.2.0/spyder/plugins/editor.py 2017-08-12 21:45:09.455757449 +0200 +@@ -56,7 +56,7 @@ + # Dependencies
+ NBCONVERT_REQVER = ">=4.0"
+ dependencies.add("nbconvert", _("Manipulate Jupyter notebooks on the Editor"),
+- required_version=NBCONVERT_REQVER)
++ required_version=NBCONVERT_REQVER, optional=True)
+
+
+ def _load_all_breakpoints():
diff --git a/bug_54508_missing_pyqt4_qtwebkit.patch b/bug_54508_missing_pyqt4_qtwebkit.patch new file mode 100644 index 00000000000..8e1cce2ebc6 --- /dev/null +++ b/bug_54508_missing_pyqt4_qtwebkit.patch @@ -0,0 +1,24 @@ +diff -Naur spyder-3.1.4.orig/scripts/spyder spyder-3.1.4/scripts/spyder +--- spyder-3.1.4.orig/scripts/spyder 2017-04-24 02:30:23.000000000 +0200 ++++ spyder-3.1.4/scripts/spyder 2017-07-09 18:47:22.072698407 +0200 +@@ -1,3 +1,8 @@ + #!/usr/bin/env python ++ ++# Forced QT API to pyqt5 (see https://bugs.archlinux.org/task/54508) ++import os ++os.environ['QT_API'] = 'pyqt5' ++ + from spyder.app import start + start.main() +diff -Naur spyder-3.1.4.orig/scripts/spyder3 spyder-3.1.4/scripts/spyder3 +--- spyder-3.1.4.orig/scripts/spyder3 2017-04-24 02:30:23.000000000 +0200 ++++ spyder-3.1.4/scripts/spyder3 2017-07-09 18:47:27.659425267 +0200 +@@ -1,3 +1,8 @@ + #! /usr/bin/python3 ++ ++# Forced QT API to pyqt5 (see https://bugs.archlinux.org/task/54508) ++import os ++os.environ['QT_API'] = 'pyqt5' ++ + from spyder.app import start + start.main() diff --git a/python2.patch b/python2.patch new file mode 100644 index 00000000000..078ff21d04b --- /dev/null +++ b/python2.patch @@ -0,0 +1,17 @@ +diff -Naur spyder-3.2.0.orig/scripts/spyder spyder-3.2.0/scripts/spyder +--- spyder-3.2.0.orig/scripts/spyder 2017-07-24 05:03:40.000000000 +0200 ++++ spyder-3.2.0/scripts/spyder 2017-08-12 21:22:11.230212853 +0200 +@@ -1,3 +1,3 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2 + from spyder.app import start + start.main() +diff -Naur spyder-3.2.0.orig/spyder/app/restart.py spyder-3.2.0/spyder/app/restart.py +--- spyder-3.2.0.orig/spyder/app/restart.py 2017-07-24 05:03:40.000000000 +0200 ++++ spyder-3.2.0/spyder/app/restart.py 2017-08-12 21:22:11.230212853 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # -*- coding: utf-8 -*-
+ #
+ # Copyright © Spyder Project Contributors
|