summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 43cf2a3367d7bcd190d3b75034d3af8af53df557 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Maintainer: willemw <willemw12@gmail.com>

_pkgname2=spyder
_pkgname3=spyder3
pkgbase=$_pkgname2-git
pkgname=($_pkgname2-git $_pkgname3-git)
pkgver=3.0.0b1.r172.g47a5a0c
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() {
  rm -rf $_pkgname3
  cp -a $_pkgname2 $_pkgname3

  # Patch Python/Python2
  cd $_pkgname2
  sed -i 's|#![ ]*/usr/bin/env python[ \t\r]*$|#!/usr/bin/env python2|' 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=('ipython2-notebook' 'python2-pyqt4' 'python2-pyflakes' 'python2-pyzmq' 'python2-pygments'
           'desktop-file-utils' 'gtk-update-icon-cache')
  #'ipython2<4.0: enhanced Python interpreter'
  #'ipython2-notebook>=4.0: enhanced Python interpreter (qtconsole)'
  optdepends=('python2-pylint: powerful code analysis'
              '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')
  provides=($_pkgname2)
  conflicts=($_pkgname2)

  cd $_pkgname2
  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/$_pkgname2/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=('jupyter' 'python-pyqt4' 'python-pyflakes' 'python-pyzmq' 'python-pygments'
           'desktop-file-utils' 'gtk-update-icon-cache')
  #'ipython<4.0: enhanced Python interpreter'
  #'jupyter>=4.0: enhanced Python interpreter (qtconsole)'
  optdepends=('python-pylint: powerful code analysis'
              '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')
  provides=($_pkgname3)
  conflicts=($_pkgname3)

  cd $_pkgname3
  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/$_pkgname3/LICENSE"
  rm "$pkgdir/usr/bin/spyder_win_post_install.py"
}