summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 067b8c6e5b4925b4a4cc7f787c21ec0beaa80b68 (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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Maintainer: willemw <willemw12@gmail.com>

_pkgname2=spyder
_pkgname3=spyder3
pkgbase=$_pkgname2-git
pkgname=($_pkgname2-git $_pkgname3-git)
pkgver=4.0.0b2.r298.gf0e625450
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'
  #TODO 'python2-qdarkstyle'
  #TODO 'python2-diff-match-patch'
  depends=('python2-atomicwrites'
           'python2-chardet'
           'python2-jedi'
           'python2-keyring'
           'python2-language-server'
           'python2-paramiko'
           'python2-pexpect'
           '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'

           'python2-pathlib2'

           'desktop-file-utils'
           'gtk-update-icon-cache')
  #'python2-pyside2: Qt-Python bindings'
  optdepends=('cython2: run Cython files'
              '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.txt "$pkgdir/usr/share/licenses/$_pkgname2/LICENSE.txt"
  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-atomicwrites'
           'python-chardet'
           'python-diff-match-patch'
           'python-jedi'
           'python-keyring'
           'python-language-server'
           'python-paramiko'
           'python-pexpect'
           'python-pickleshare'
           'python-psutil'
           'python-pycodestyle'
           'python-pyflakes'
           'python-pygments'
           'python-pylint'
           'python-pyqt5'
           'python-pyzmq'
           'python-qdarkstyle'
           'python-qtawesome'
           'python-qtconsole'
           'python-rope'
           'python-sphinx'
           'python-spyder-kernels'

           'desktop-file-utils'
           'gtk-update-icon-cache')
  #'pyside2: Qt-Python bindings'
  optdepends=('cython: run Cython files'
              '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.txt "$pkgdir/usr/share/licenses/$_pkgname3/LICENSE.txt"
  rm -f "$pkgdir/usr/bin/spyder_win_post_install.py"
}