summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorwillemw122015-06-08 12:47:23 +0200
committerwillemw122015-06-08 12:47:23 +0200
commitd75e03a24c6404fa3dc15943378d8d8e5e64b027 (patch)
tree2b5f9bff2d1a4af99fd527092bfef2dcb71683de /PKGBUILD
downloadaur-d75e03a24c6404fa3dc15943378d8d8e5e64b027.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD101
1 files changed, 101 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..bfd0fe9e0df
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,101 @@
+# Maintainer: willemw <willemw12@gmail.com>
+
+_pkgname2=spyder
+_pkgname3=spyder3
+pkgbase=$_pkgname2-git
+pkgname=($_pkgname2-git $_pkgname3-git)
+pkgver=2.3.4.r1866.g76a9a5f
+pkgrel=1
+arch=('any')
+url="https://github.com/spyder-ide/spyder"
+license=('MIT')
+makedepends=('python2-sphinx' 'python2-setuptools'
+ 'python-sphinx' 'python-setuptools'
+ 'git')
+install=$pkgname.install
+source=($_pkgname2::git://github.com/spyder-ide/spyder.git)
+md5sums=('SKIP')
+
+pkgver() {
+ cd $_pkgname2
+ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cp -a $_pkgname2 $_pkgname3
+
+ cd $_pkgname2
+
+ # Patch PYLINT_PATH = programs.find_program('pylint')
+ sed -i "s/find_program('pylint'/find_program('pylint2'/" spyderplugins/widgets/pylintgui.py
+ # Patch process = subprocess.Popen(['pylint', '--version'],
+ sed -i "s/subprocess.Popen(\['pylint'/subprocess.Popen(\['pylint2'/" spyderplugins/widgets/pylintgui.py
+ # Patch match = re.match('(pylint|pylint-script.py) ([0-9\.]*)', lines[0])
+ sed -i "s/re.match('(pylint|pylint-script.py/re.match('(pylint2|pylint2-script.py/" spyderplugins/widgets/pylintgui.py
+
+ # Patch Python/Python2
+ sed -i 's|#![ ]*/usr/bin/env python[ \t\r]*$|#!/usr/bin/env python2|' spyderlib/userconfig.py spyderlib/utils/external/pickleshare.py
+}
+
+build() {
+ cd "$srcdir/$_pkgname2"
+ python2 setup.py build
+
+ cd "$srcdir/$_pkgname3"
+ python setup.py build
+}
+
+package_spyder-git() {
+ pkgdesc="Scientific PYthon Development EnviRonment providing MATLAB-like features (Python 2 version)"
+ depends=('python2-pyqt4' 'python2-pyflakes' 'python2-pyzmq' 'python2-pygments'
+ 'desktop-file-utils' 'gtk-update-icon-cache')
+ optdepends=('python2-pylint: powerful code analysis'
+ 'ipython2: enhanced Python interpreter'
+ 'python2-rope: editor code completion, calltips and go-to-definition'
+ 'python2-sphinx: rich text help on the object inspector'
+ 'python2-numpy: N-dimensional arrays'
+ 'python2-scipy: signal/image processing'
+ 'python2-psutil: memory/CPU usage in the status bar'
+ 'python2-h5py: HDF5 support'
+ 'python2-matplotlib: interactive 2D/3D data plotting'
+ 'pep8-python2: real-time code style analysis'
+ 'python2-sympy: symbolic mathematics for the IPython console')
+ _pkgname='spyder'
+ provides=($_pkgname)
+ conflicts=($_pkgname)
+
+ cd $_pkgname
+ python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+ # Install a scalable icon for the spyder.desktop file
+ install -Dm644 spyderlib/images/spyder.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/spyder.svg"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ rm "$pkgdir/usr/bin/spyder_win_post_install.py"
+}
+
+package_spyder3-git() {
+ pkgdesc="Scientific PYthon Development EnviRonment providing MATLAB-like features (Python 3 version)"
+ depends=('python-pyqt4' 'python-pyflakes' 'python-pyzmq' 'python-pygments'
+ 'desktop-file-utils' 'gtk-update-icon-cache')
+ optdepends=('python-pylint: powerful code analysis'
+ 'ipython: enhanced Python interpreter'
+ 'python-rope: editor code completion, calltips and go-to-definition'
+ 'python-sphinx: rich text help on the object inspector'
+ 'python-numpy: N-dimensional arrays'
+ 'python-scipy: signal/image processing'
+ 'python-psutil: memory/CPU usage in the status bar'
+ 'python-h5py: HDF5 support'
+ 'python-matplotlib: interactive 2D/3D data plotting'
+ 'pep8: real-time code style analysis'
+ 'python-sympy: symbolic mathematics for the IPython console')
+ _pkgname='spyder3'
+ provides=($_pkgname)
+ conflicts=($_pkgname)
+
+ cd $_pkgname
+ python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+ # Install a scalable icon for the spyder3.desktop file
+ install -Dm644 spyderlib/images/spyder.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/spyder3.svg"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ rm "$pkgdir/usr/bin/spyder_win_post_install.py"
+}
+