summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ee6df0a62d0e4c3f42b566b804457d64661ea7b2 (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Maintainer: willemw <willemw12@gmail.com>

_pkgname2=spyder
_pkgname3=spyder3
pkgbase=$_pkgname2-git
pkgname=($_pkgname2-git $_pkgname3-git)
pkgver=3.3.0.r1455.g678cedc97
pkgrel=1
arch=('any')
url="https://www.spyder-ide.org/"
license=('MIT')
makedepends=('python2-sphinx' 'python2-setuptools' 
             'python-sphinx' 'python-setuptools'
             'git')
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() {
  find $_pkgname2 -type f -iname \*.py -exec sed -i -e 's|"pep8"|"pycodestyle"|g' -e "s|'pep8'|'pycodestyle'|g" '{}' \;

  rm -rf $_pkgname3
  cp -a $_pkgname2 $_pkgname3
}

build() {
  cd "$srcdir/$_pkgname2"
  python2 setup.py build

  cd "$srcdir/$_pkgname3"
  python setup.py build
}

package_spyder-git() {
  pkgdesc="The Scientific Python Development Environment (Python 2 version)"
  # Note: 'ipython2-notebook' nor 'jupyter'/'jupyter-nbconvert' contain a Python 2 version of Nbconvert
  # 'icu'
  depends=('python2-jedi'
           'python2-pickleshare'
           'python2-psutil'
           'python2-pycodestyle'
           'python2-pyflakes'
           'python2-pygments'
           'python2-pylint'
           'python2-pyqt5'
           'python2-pyzmq'
           'python2-qtawesome'
           'python2-qtconsole'
           'python2-rope'
           'python2-sphinx'
           'python2-spyder-kernels'

           'desktop-file-utils'
           'gtk-update-icon-cache')
  #'python2-pyside2: Qt-Python bindings'
  optdepends=('python2-matplotlib: 2D/3D plotting'
              'python2-numpy: N-dimensional arrays'
              'python2-pandas: DataFrame and Series support'
              'python2-scipy: signal/image processing'
              'python2-sympy: symbolic mathematics'

              'python2-h5py: HDF5 support')
  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 spyder/images/spyder.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/spyder.svg"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname2/LICENSE"
  rm -f "$pkgdir/usr/bin/spyder_win_post_install.py"
}

package_spyder3-git() {
  pkgdesc="The Scientific Python Development Environment (Python 3 version)"
  # 'icu'
  depends=('jupyter-nbconvert'
           'python-jedi'
           'python-pickleshare'
           'python-psutil'
           'python-pycodestyle'
           'python-pyflakes'
           'python-pygments'
           'python-pylint'
           'python-pyqt5'
           'python-pyzmq'
           'python-qtawesome'
           'python-qtconsole'
           'python-rope'
           'python-sphinx'
           'python-spyder-kernels'

           'desktop-file-utils'
           'gtk-update-icon-cache')
  #'pyside2: Qt-Python bindings'
  optdepends=('python-matplotlib: 2D/3D plotting'
              'python-numpy: N-dimensional arrays'
              'python-pandas: DataFrame and Series support'
              'python-scipy: signal/image processing'
              'python-sympy: symbolic mathematics'

              'python-h5py: HDF5 support')
  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 spyder/images/spyder.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/spyder3.svg"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname3/LICENSE"
  rm -f "$pkgdir/usr/bin/spyder_win_post_install.py"
}